Mercurial > hg > octave-lyh
changeset 4359:77605935a783
[project @ 2003-02-23 04:18:26 by jwe]
author | jwe |
---|---|
date | Sun, 23 Feb 2003 04:18:27 +0000 |
parents | 83d4452bc522 |
children | 1d7180ab9df1 |
files | test/octave.test/string/char-1.m test/octave.test/string/char-2.m test/octave.test/string/char-3.m test/octave.test/string/setstr-1.m test/octave.test/string/setstr-2.m test/octave.test/string/setstr-3.m test/octave.test/string/string.exp test/octave.test/struct/fieldnames-1.m test/octave.test/struct/fieldnames-2.m test/octave.test/struct/fieldnames-3.m test/octave.test/struct/fieldnames-4.m test/octave.test/struct/fieldnames-5.m test/octave.test/struct/isfield-1.m test/octave.test/struct/isfield-2.m test/octave.test/struct/isfield-3.m test/octave.test/struct/isfield-4.m test/octave.test/struct/isfield-5.m test/octave.test/struct/isfield-6.m test/octave.test/struct/struct.exp test/octave.test/struct/struct_contains-1.m test/octave.test/struct/struct_contains-2.m test/octave.test/struct/struct_contains-3.m test/octave.test/struct/struct_contains-4.m test/octave.test/struct/struct_contains-5.m test/octave.test/struct/struct_contains-6.m test/octave.test/struct/struct_elements-1.m test/octave.test/struct/struct_elements-2.m test/octave.test/struct/struct_elements-3.m test/octave.test/struct/struct_elements-4.m test/octave.test/struct/struct_elements-5.m |
diffstat | 30 files changed, 87 insertions(+), 82 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/char-1.m @@ -0,0 +1,1 @@ +strcmp (char ([65, 83, 67, 73, 73]), "ASCII")
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/char-3.m @@ -0,0 +1,4 @@ +x = char ("foo", "bar", "foobar"); +(strcmp (x(1,:), "foo ") + && strcmp (x(2,:), "bar ") + && strcmp (x(3,:), "foobar"))
deleted file mode 100644 --- a/test/octave.test/string/setstr-1.m +++ /dev/null @@ -1,1 +0,0 @@ -strcmp (setstr ([65, 83, 67, 73, 73]), "ASCII")
deleted file mode 100644 --- a/test/octave.test/string/setstr-2.m +++ /dev/null @@ -1,1 +0,0 @@ -setstr ()
deleted file mode 100644 --- a/test/octave.test/string/setstr-3.m +++ /dev/null @@ -1,1 +0,0 @@ -setstr (2, 1)
--- a/test/octave.test/string/string.exp +++ b/test/octave.test/string/string.exp @@ -110,6 +110,18 @@ set prog_output "usage:.*" do_test blanks-3.m +set test char-1 +set prog_output "ans = 1" +do_test char-1.m + +set test char-2 +set prog_output "\n... char:.*" +do_test char-2.m + +set test char-3 +set prog_output "ans = 1" +do_test char-3.m + set test int2str-1 set prog_output "ans = 1" do_test int2str-1.m @@ -134,21 +146,9 @@ set prog_output "usage:.*" do_test num2str-3.m -set test setstr-1 +set test strcat-1.m set prog_output "ans = 1" -do_test setstr-1.m - -set test setstr-2 -set prog_output "\n... setstr:.*" -do_test setstr-2.m - -set test setstr-3 -set prog_output "\n... setstr:.*" -do_test setstr-3.m - -set test strcat- -set prog_output "" -do_test strcat-.m +do_test strcat-1.m set test strcat-2 set prog_output "usage:.*"
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/fieldnames-1.m @@ -0,0 +1,3 @@ +s.a = 1; +c = fieldnames (s); +iscell (c) && strcmp (c{1}, "a")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/fieldnames-2.m @@ -0,0 +1,3 @@ +s.a.b = 1; +c = fieldnames (s.a); +iscell (c) && strcmp (c{1}, "b")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/fieldnames-3.m @@ -0,0 +1,1 @@ +fieldnames ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/fieldnames-4.m @@ -0,0 +1,2 @@ +s.a = 1; +fieldnames (s, 1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/fieldnames-5.m @@ -0,0 +1,1 @@ +fieldnames (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/isfield-1.m @@ -0,0 +1,3 @@ +s.aaa = 1; +s.a = 2; +isfield (s, "a")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/isfield-2.m @@ -0,0 +1,3 @@ +s.aaa = 1; +s.a = 2; +isfield (s, "b")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/isfield-3.m @@ -0,0 +1,1 @@ +isfield ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/isfield-4.m @@ -0,0 +1,3 @@ +s.aaa = 1; +s.a = 2; +isfield (s, "a", 3)
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/isfield-5.m @@ -0,0 +1,1 @@ +isfield (1, "m")
new file mode 100644 --- /dev/null +++ b/test/octave.test/struct/isfield-6.m @@ -0,0 +1,2 @@ +s.a = 2; +isfield (s, 2)
--- a/test/octave.test/struct/struct.exp +++ b/test/octave.test/struct/struct.exp @@ -1,3 +1,47 @@ +set test fieldnames-1 +set prog_output "ans = 1" +do_test fieldnames-1.m + +set test fieldnames-2 +set prog_output "ans = 1" +do_test fieldnames-2.m + +set test fieldnames-3 +set prog_output "\n... fieldnames:.*" +do_test fieldnames-3.m + +set test fieldnames-4 +set prog_output "\n... fieldnames:.*" +do_test fieldnames-4.m + +set test fieldnames-5 +set prog_output "error:.*" +do_test fieldnames-5.m + +set test isfield-1 +set prog_output "ans = 1" +do_test isfield-1.m + +set test isfield-2 +set prog_output "ans = 0" +do_test isfield-2.m + +set test isfield-3 +set prog_output "\n... isfield:.*" +do_test isfield-3.m + +set test isfield-4 +set prog_output "\n... isfield:.*" +do_test isfield-4.m + +set test isfield-5 +set prog_output "\n... isfield:.*" +do_test isfield-5.m + +set test isfield-6 +set prog_output "\n... isfield:.*" +do_test isfield-6.m + set test isstruct-1 set prog_output "ans = 0" do_test isstruct-1.m @@ -41,47 +85,3 @@ set test isstruct-11 set prog_output "\n... isstruct:.*" do_test isstruct-11.m - -set test struct_contains-1 -set prog_output "ans = 1" -do_test struct_contains-1.m - -set test struct_contains-2 -set prog_output "ans = 0" -do_test struct_contains-2.m - -set test struct_contains-3 -set prog_output "\n... struct_contains:.*" -do_test struct_contains-3.m - -set test struct_contains-4 -set prog_output "\n... struct_contains:.*" -do_test struct_contains-4.m - -set test struct_contains-5 -set prog_output "\n... struct_contains:.*" -do_test struct_contains-5.m - -set test struct_contains-6 -set prog_output "\n... struct_contains:.*" -do_test struct_contains-6.m - -set test struct_elements-1 -set prog_output "ans = 1" -do_test struct_elements-1.m - -set test struct_elements-2 -set prog_output "ans = 1" -do_test struct_elements-2.m - -set test struct_elements-3 -set prog_output "\n... struct_elements:.*" -do_test struct_elements-3.m - -set test struct_elements-4 -set prog_output "\n... struct_elements:.*" -do_test struct_elements-4.m - -set test struct_elements-5 -set prog_output "error:.*" -do_test struct_elements-5.m
deleted file mode 100644 --- a/test/octave.test/struct/struct_contains-1.m +++ /dev/null @@ -1,3 +0,0 @@ -s.aaa = 1; -s.a = 2; -struct_contains (s, "a")
deleted file mode 100644 --- a/test/octave.test/struct/struct_contains-2.m +++ /dev/null @@ -1,3 +0,0 @@ -s.aaa = 1; -s.a = 2; -struct_contains (s, "b")
deleted file mode 100644 --- a/test/octave.test/struct/struct_contains-3.m +++ /dev/null @@ -1,1 +0,0 @@ -struct_contains ()
deleted file mode 100644 --- a/test/octave.test/struct/struct_contains-4.m +++ /dev/null @@ -1,3 +0,0 @@ -s.aaa = 1; -s.a = 2; -struct_contains (s, "a", 3)
deleted file mode 100644 --- a/test/octave.test/struct/struct_contains-5.m +++ /dev/null @@ -1,1 +0,0 @@ -struct_contains (1, "m")
deleted file mode 100644 --- a/test/octave.test/struct/struct_contains-6.m +++ /dev/null @@ -1,2 +0,0 @@ -s.a = 2; -struct_contains (s, 2)
deleted file mode 100644 --- a/test/octave.test/struct/struct_elements-1.m +++ /dev/null @@ -1,2 +0,0 @@ -s.a = 1; -strcmp (struct_elements (s), "a")
deleted file mode 100644 --- a/test/octave.test/struct/struct_elements-2.m +++ /dev/null @@ -1,2 +0,0 @@ -s.a.b = 1; -strcmp (struct_elements (s.a), "b")
deleted file mode 100644 --- a/test/octave.test/struct/struct_elements-3.m +++ /dev/null @@ -1,1 +0,0 @@ -struct_elements ()