Mercurial > octave-nkf
comparison test/global.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_global.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/octave.test/global/global-1.m | |
20 %!test | |
21 %! global G = 1; | |
22 %! assert (G,1); | |
23 | |
24 %% test/octave.test/global/global-2.m | |
25 %!function f () | |
26 %! global G; | |
27 %! assert (G,1); | |
28 %!endfunction | |
29 %!test | |
30 %! global G = 1; | |
31 %! f; | |
32 | |
33 %% test/octave.test/global/global-3.m | |
34 %!function f () | |
35 %! fail ("G"); | |
36 %!endfunction | |
37 %!test | |
38 %! global G = 1; | |
39 %! f(); | |
40 | |
41 %% test/octave.test/global/global-4.m | |
42 %!function f () | |
43 %! global H = 1; | |
44 %!endfunction | |
45 %!test | |
46 %! f; | |
47 %! fail ("H"); | |
48 | |
49 %% test/octave.test/global/global-5.m | |
50 %!function f () | |
51 %! global H = 1; | |
52 %!endfunction | |
53 %!test | |
54 %!function g () | |
55 %! fail ("H"); | |
56 %!test | |
57 %! g(); | |
58 | |
59 %% test/octave.test/global/global-6.m | |
60 %!function f () | |
61 %! global H = 1; | |
62 %!endfunction | |
63 %!function g () | |
64 %! global H; | |
65 %! assert (H,1); | |
66 %!endfunction | |
67 %!test | |
68 %! f(); | |
69 %! g(); | |
70 | |
71 %% test/octave.test/global/global-7.m | |
72 %!test | |
73 %!function f () | |
74 %! global H = 1; | |
75 %!endfunction | |
76 %!test | |
77 %! fail ("H"); | |
78 | |
79 %% test/octave.test/global/global-8.m | |
80 %!function f () | |
81 %! global H = 1; | |
82 %!endfunction | |
83 %!function g () | |
84 %! global H; | |
85 %! assert (H,1); | |
86 %!endfunction | |
87 %!test | |
88 %! f; | |
89 %! clear H; | |
90 %! g; | |
91 |