Mercurial > hg > octave-nkf
changeset 2722:edf07fea9fa4
[project @ 1997-02-22 21:02:04 by jwe]
str-esc-1.m
author | jwe |
---|---|
date | Sat, 22 Feb 1997 21:02:05 +0000 |
parents | 1c256e0e1474 |
children | b494ce9df34a |
files | test/octave.test/string/str-esc-10.m test/octave.test/string/str-esc-11.m test/octave.test/string/str-esc-12.m test/octave.test/string/str-esc-2.m test/octave.test/string/str-esc-3.m test/octave.test/string/str-esc-4.m test/octave.test/string/str-esc-5.m test/octave.test/string/str-esc-6.m test/octave.test/string/str-esc-7.m test/octave.test/string/str-esc-8.m test/octave.test/string/str-esc-9.m test/octave.test/string/string.exp |
diffstat | 12 files changed, 91 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-10.m @@ -0,0 +1,4 @@ +x = 34; +if (strcmp ("\"", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-11.m @@ -0,0 +1,4 @@ +x = 120; +if (strcmp ("\x", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-12.m @@ -0,0 +1,4 @@ +x = [7, 8, 12, 10, 13, 9, 11, 92, 39, 34]; +if (strcmp ("\a\b\f\n\r\t\v\\\'\"", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-2.m @@ -0,0 +1,4 @@ +x = 8; +if (strcmp ("\b", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-3.m @@ -0,0 +1,4 @@ +x = 12; +if (strcmp ("\f", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-4.m @@ -0,0 +1,4 @@ +x = 10; +if (strcmp ("\n", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-5.m @@ -0,0 +1,4 @@ +x = 13; +if (strcmp ("\r", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-6.m @@ -0,0 +1,4 @@ +x = 9; +if (strcmp ("\t", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-7.m @@ -0,0 +1,4 @@ +x = 11; +if (strcmp ("\v", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-8.m @@ -0,0 +1,4 @@ +x = 92; +if (strcmp ("\\", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/str-esc-9.m @@ -0,0 +1,4 @@ +x = 39; +if (strcmp ("\'", setstr (x))) + printf ("ok\n"); +endif
new file mode 100644 --- /dev/null +++ b/test/octave.test/string/string.exp @@ -0,0 +1,47 @@ +set test str-esc-1 +set prog_output "ok" +do_test str-esc-1.m + +set test str-esc-2 +set prog_output "ok" +do_test str-esc-2.m + +set test str-esc-3 +set prog_output "ok" +do_test str-esc-3.m + +set test str-esc-4 +set prog_output "ok" +do_test str-esc-4.m + +set test str-esc-5 +set prog_output "ok" +do_test str-esc-5.m + +set test str-esc-6 +set prog_output "ok" +do_test str-esc-6.m + +set test str-esc-7 +set prog_output "ok" +do_test str-esc-7.m + +set test str-esc-8 +set prog_output "ok" +do_test str-esc-8.m + +set test str-esc-9 +set prog_output "ok" +do_test str-esc-9.m + +set test str-esc-10 +set prog_output "ok" +do_test str-esc-10.m + +set test str-esc-11 +set prog_output ".*unrecognized escape sequence.*" +do_test str-esc-11.m + +set test str-esc-12 +set prog_output "ok" +do_test str-esc-12.m