Mercurial > hg > octave-nkf
changeset 2731:c1b85bf44213
[project @ 1997-02-24 23:59:20 by jwe]
author | jwe |
---|---|
date | Mon, 24 Feb 1997 23:59:21 +0000 |
parents | b7758860ea6b |
children | d1fb65837925 |
files | test/octave.test/error/error-1.m test/octave.test/error/error-2.m test/octave.test/error/error-3.m test/octave.test/error/error-4.m test/octave.test/error/error.exp test/octave.test/error/usage-1.m test/octave.test/error/usage-2.m test/octave.test/error/usage-3.m test/octave.test/error/usage-4.m test/octave.test/error/warning-1.m test/octave.test/error/warning-2.m test/octave.test/error/warning-3.m |
diffstat | 12 files changed, 65 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/test/octave.test/error/error-1.m @@ -0,0 +1,3 @@ +function g () error ("foo"); endfunction +function f () g (); endfunction +f ();
new file mode 100644 --- /dev/null +++ b/test/octave.test/error/error-2.m @@ -0,0 +1,3 @@ +function g () error ("foo\n"); endfunction +function f () g endfunction +f
new file mode 100644 --- /dev/null +++ b/test/octave.test/error/error-4.m @@ -0,0 +1,1 @@ +error ("foo\n")
--- a/test/octave.test/error/error.exp +++ b/test/octave.test/error/error.exp @@ -1,3 +1,44 @@ -# error -# warning -# usage +set test error-1 +set prog_output "error: foo\nerror: evaluating index expression near line 1, column 15\nerror: called from `g'\nerror: called from `f'" +do_test error-1.m + +set test error-2 +set prog_output "error: foo" +do_test error-2.m + +set test error-3 +set prog_output "error: unspecified error" +do_test error-3.m + +set test error-4 +set prog_output "error: foo" +do_test error-4.m + +set test warning-1 +set prog_output "warning: foo" +do_test warning-1.m + +set test warning-2 +set prog_output "warning: unspecified warning" +do_test warning-2.m + +set test warning-3 +set prog_output "warning: foo" +do_test warning-3.m + +set test usage-1 +set prog_output "usage: foo\nerror: called from `g'\nerror: called from `f'" +do_test usage-1.m + +set test usage-2 +set prog_output "usage: foo" +do_test usage-2.m + +set test usage-3 +set prog_output "usage: unknown" +do_test usage-3.m + +set test usage-4 +set prog_output "usage: foo" +do_test usage-4.m +
new file mode 100644 --- /dev/null +++ b/test/octave.test/error/usage-1.m @@ -0,0 +1,3 @@ +function g () usage ("foo"); endfunction +function f () g (); endfunction +f ();
new file mode 100644 --- /dev/null +++ b/test/octave.test/error/usage-2.m @@ -0,0 +1,3 @@ +function g () usage ("foo\n"); endfunction +function f () g endfunction +f
new file mode 100644 --- /dev/null +++ b/test/octave.test/error/usage-4.m @@ -0,0 +1,1 @@ +usage ("foo\n")
new file mode 100644 --- /dev/null +++ b/test/octave.test/error/warning-1.m @@ -0,0 +1,3 @@ +function g () warning ("foo") endfunction +function f () g (); endfunction +f ();