Mercurial > octave-nkf
comparison test/error.tst @ 16030:1af8d21608b7
rename all test files in the test directory from test_X.m to X.tst
* Use - instead of _ for .tst file names. Fix all file lists in
module.mk and Makefile.am files.
* __run_test_suite__.m: Adapt to new naming convention.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 09 Feb 2013 21:35:55 -0500 |
parents | test/test_error.m@72c96de7a403 |
children | b1283d4c06c2 |
comparison
equal
deleted
inserted
replaced
16029:b8157404614f | 16030:1af8d21608b7 |
---|---|
1 ## Copyright (C) 2006-2012 John W. Eaton | |
2 ## | |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 ## Test %!error usage | |
20 | |
21 %% test/octave.test/error/error-1.m | |
22 %!function g () | |
23 %! error ("foo"); | |
24 %!endfunction | |
25 %!function f () | |
26 %! g (); | |
27 %!endfunction | |
28 %!error <foo> f () | |
29 | |
30 %% test/octave.test/error/error-2.m | |
31 %!function g () | |
32 %! error ("foo\n"); | |
33 %!endfunction | |
34 %!function f () | |
35 %! g | |
36 %!endfunction | |
37 %!error <foo> f () | |
38 | |
39 %% test/octave.test/error/error-3.m | |
40 %!error error () | |
41 | |
42 %% test/octave.test/error/error-4.m | |
43 %!error <foo> error ("foo\n") | |
44 | |
45 ## Test %!warning usage | |
46 | |
47 %% test/octave.test/error/warning-1.m | |
48 %!function g () | |
49 %! warning ("foo"); | |
50 %!endfunction | |
51 %!function f () | |
52 %! g; | |
53 %!endfunction | |
54 %!warning <foo> f () | |
55 | |
56 %% test/octave.test/error/warning-2.m | |
57 %!test | |
58 %! st.identifier = "backtrace"; | |
59 %! ws = warning ("query", "backtrace"); | |
60 %! warning ("on", "backtrace"); | |
61 %! st.state = "on"; | |
62 %! assert(warning ("query", "backtrace"), st); | |
63 %! warning ("off", "backtrace"); | |
64 %! st.state = "off"; | |
65 %! assert(warning ("query", "backtrace"), st); | |
66 %! warning (ws.state, "backtrace"); | |
67 | |
68 ## Test usage() function | |
69 | |
70 %% test/octave.test/error/usage-1.m | |
71 %!function g () | |
72 %! usage ("foo"); | |
73 %!endfunction | |
74 %!function f () | |
75 %! g (); | |
76 %!endfunction | |
77 %!error <foo> f () | |
78 | |
79 %% test/octave.test/error/usage-2.m | |
80 %!function g () | |
81 %! usage ("foo"); | |
82 %!endfunction | |
83 %!function f () | |
84 %! g | |
85 %!endfunction | |
86 %!error <foo> f () | |
87 | |
88 %% test/octave.test/error/usage-3.m | |
89 %!error usage () | |
90 | |
91 %% test/octave.test/error/usage-4.m | |
92 %!error <foo> usage ("foo\n") | |
93 |