Mercurial > hg > octave-lojdl
changeset 2737:38463e268d55
[project @ 1997-02-25 05:23:42 by jwe]
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isalnum-1.m @@ -0,0 +1,9 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result ((toascii("A"):toascii("Z"))+1) = 1; +result ((toascii("0"):toascii("9"))+1) = 1; +result ((toascii("a"):toascii("z"))+1) = 1; + +all (isalnum (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isalnum-2.m @@ -0,0 +1,1 @@ +isalnum (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isalnum-3.m @@ -0,0 +1,1 @@ +isalnum ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isalpha-1.m @@ -0,0 +1,8 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result ((toascii("A"):toascii("Z"))+1) = 1; +result ((toascii("a"):toascii("z"))+1) = 1; + +all (isalpha (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isalpha-2.m @@ -0,0 +1,1 @@ +isalpha (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isalpha-3.m @@ -0,0 +1,1 @@ +isalpha ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isascii-1.m @@ -0,0 +1,5 @@ +charset = setstr (0:127); + +result = ones (1, 128); + +all (isascii (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isascii-2.m @@ -0,0 +1,1 @@ +isascii (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isascii-3.m @@ -0,0 +1,1 @@ +isascii ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/iscntrl-1.m @@ -0,0 +1,7 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result (1:32) = 1; + +all (iscntrl (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/iscntrl-2.m @@ -0,0 +1,1 @@ +iscntrl (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/iscntrl-3.m @@ -0,0 +1,1 @@ +iscntrl ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isdigit-1.m @@ -0,0 +1,7 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result ((toascii("0"):toascii("9"))+1) = 1; + +all (isdigit (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isdigit-2.m @@ -0,0 +1,1 @@ +isdigit (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isdigit-3.m @@ -0,0 +1,1 @@ +isdigit ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isgraph-1.m @@ -0,0 +1,7 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result (34:127) = 1; + +all (isgraph (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isgraph-2.m @@ -0,0 +1,1 @@ +isgraph (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isgraph-3.m @@ -0,0 +1,1 @@ +isgraph ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/islower-1.m @@ -0,0 +1,7 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result ((toascii("a"):toascii("z"))+1) = 1; + +all (islower (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/islower-2.m @@ -0,0 +1,1 @@ +islower (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/islower-3.m @@ -0,0 +1,1 @@ +islower ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isprint-2.m @@ -0,0 +1,1 @@ +isprint (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isprint-3.m @@ -0,0 +1,1 @@ +isprint ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/ispunct-1.m @@ -0,0 +1,10 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result (34:48) = 1; +result (59:65) = 1; +result (92:97) = 1; +result (124:127) = 1; + +all (ispunct (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/ispunct-2.m @@ -0,0 +1,1 @@ +ispunct (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/ispunct-3.m @@ -0,0 +1,1 @@ +ispunct ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isspace-1.m @@ -0,0 +1,7 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result (toascii (" \f\n\r\t\v")+1) = 1; + +all (isspace (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isspace-2.m @@ -0,0 +1,1 @@ +isspace (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isspace-3.m @@ -0,0 +1,1 @@ +isspace ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-1.m @@ -0,0 +1,1 @@ +isstr (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-10.m @@ -0,0 +1,1 @@ +isstr ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-11.m @@ -0,0 +1,1 @@ +isstr ("test", 1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-2.m @@ -0,0 +1,1 @@ +isstr ([1, 2])
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-3.m @@ -0,0 +1,1 @@ +isstr ([])
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-4.m @@ -0,0 +1,1 @@ +isstr ([1, 2; 3, 4])
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-5.m @@ -0,0 +1,1 @@ +isstr ("")
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-6.m @@ -0,0 +1,1 @@ +isstr ("t")
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-7.m @@ -0,0 +1,1 @@ +isstr ("test")
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-8.m @@ -0,0 +1,1 @@ +isstr (["test"; "ing"])
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isstr-9.m @@ -0,0 +1,2 @@ +s.a = "test"; +isstr (s)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isupper-1.m @@ -0,0 +1,7 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result ((toascii("A"):toascii("Z"))+1) = 1; + +all (isupper (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isupper-2.m @@ -0,0 +1,1 @@ +isupper (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isupper-3.m @@ -0,0 +1,1 @@ +isupper ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isxdigit-1.m @@ -0,0 +1,9 @@ +charset = setstr (0:127); + +result = zeros (1, 128); + +result ((toascii("A"):toascii("F"))+1) = 1; +result ((toascii("0"):toascii("9"))+1) = 1; +result ((toascii("a"):toascii("f"))+1) = 1; + +all (isxdigit (charset) == result)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isxdigit-2.m @@ -0,0 +1,1 @@ +isxdigit (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/isxdigit-3.m @@ -0,0 +1,1 @@ +isxdigit ()
--- a/test/octave.test/string/string.exp +++ b/test/octave.test/string/string.exp @@ -117,19 +117,152 @@ # dec2hex # hex2dec # str2num +# undo_string_escapes + # toascii # tolower # toupper -# undo_string_escapes -# isalnum -# isalpha -# isascii -# iscntrl -# isdigit -# isgraph -# islower -# isprint -# ispunct -# isspace -# isupper -# isxdigit + +set test isalnum-1 +set prog_output "ans = 1" +do_test isalnum-1.m + +set test isalnum-2 +set prog_output "error:.*" +do_test isalnum-2.m + +set test isalnum-3 +set prog_output "error:.*" +do_test isalnum-3.m + +set test isalpha-1 +set prog_output "ans = 1" +do_test isalpha-1.m + +set test isalpha-2 +set prog_output "error:.*" +do_test isalpha-2.m + +set test isalpha-3 +set prog_output "error:.*" +do_test isalpha-3.m + +set test isascii-1 +set prog_output "ans = 1" +do_test isascii-1.m + +set test isascii-2 +set prog_output "error:.*" +do_test isascii-2.m + +set test isascii-3 +set prog_output "error:.*" +do_test isascii-3.m + +set test iscntrl-1 +set prog_output "ans = 1" +do_test iscntrl-1.m + +set test iscntrl-2 +set prog_output "error:.*" +do_test iscntrl-2.m + +set test iscntrl-3 +set prog_output "error:.*" +do_test iscntrl-3.m + +set test isdigit-1 +set prog_output "ans = 1" +do_test isdigit-1.m + +set test isdigit-2 +set prog_output "error:.*" +do_test isdigit-2.m + +set test isdigit-3 +set prog_output "error:.*" +do_test isdigit-3.m + +set test isgraph-1 +set prog_output "ans = 1" +do_test isgraph-1.m + +set test isgraph-2 +set prog_output "error:.*" +do_test isgraph-2.m + +set test isgraph-3 +set prog_output "error:.*" +do_test isgraph-3.m + +set test islower-1 +set prog_output "ans = 1" +do_test islower-1.m + +set test islower-2 +set prog_output "error:.*" +do_test islower-2.m + +set test islower-3 +set prog_output "error:.*" +do_test islower-3.m + +set test isprint-1 +set prog_output "ans = 1" +do_test isprint-1.m + +set test isprint-2 +set prog_output "error:.*" +do_test isprint-2.m + +set test isprint-3 +set prog_output "error:.*" +do_test isprint-3.m + +set test ispunct-1 +set prog_output "ans = 1" +do_test ispunct-1.m + +set test ispunct-2 +set prog_output "error:.*" +do_test ispunct-2.m + +set test ispunct-3 +set prog_output "error:.*" +do_test ispunct-3.m + +set test isspace-1 +set prog_output "ans = 1" +do_test isspace-1.m + +set test isspace-2 +set prog_output "error:.*" +do_test isspace-2.m + +set test isspace-3 +set prog_output "error:.*" +do_test isspace-3.m + +set test isupper-1 +set prog_output "ans = 1" +do_test isupper-1.m + +set test isupper-2 +set prog_output "error:.*" +do_test isupper-2.m + +set test isupper-3 +set prog_output "error:.*" +do_test isupper-3.m + +set test isxdigit-1 +set prog_output ""ans = 1 +do_test isxdigit-1.m + +set test isxdigit-2 +set prog_output ""error:.* +do_test isxdigit-2.m + +set test isxdigit-3 +set prog_output ""error:.* +do_test isxdigit-3.m