7016
|
1 ## Copyright (C) 2007 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 |
5590
|
19 %% Automatically generated from DejaGNU files |
|
20 |
|
21 %% test/octave.test/global/global-1.m |
|
22 %!test |
|
23 %! global G = 1; |
|
24 %! assert(G,1) |
|
25 |
|
26 %% test/octave.test/global/global-2.m |
|
27 %!function f () |
|
28 %! global G; |
|
29 %! assert(G,1); |
|
30 %!test |
|
31 %! global G = 1; |
|
32 %! f; |
|
33 |
|
34 %% test/octave.test/global/global-3.m |
|
35 %!function f () |
|
36 %! fail("G"); |
|
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 %!test |
|
45 %! f; |
|
46 %! fail("H"); |
|
47 |
|
48 %% test/octave.test/global/global-5.m |
|
49 %!function f () |
|
50 %! global H = 1; |
|
51 %!test |
|
52 %!function g () |
|
53 %! fail("H"); |
|
54 %!test |
|
55 %! g(); |
|
56 |
|
57 %% test/octave.test/global/global-6.m |
|
58 %!function f () |
|
59 %! global H = 1; |
|
60 %!function g () |
|
61 %! global H; |
|
62 %! assert(H,1); |
|
63 %!test |
|
64 %! f(); |
|
65 %! g(); |
|
66 |
|
67 %% test/octave.test/global/global-7.m |
|
68 %!test |
|
69 %!function f () |
|
70 %! global H = 1; |
|
71 %!test |
|
72 %! fail("H"); |
|
73 |
|
74 %% test/octave.test/global/global-8.m |
|
75 %!function f () |
|
76 %! global H = 1; |
|
77 %!function g () |
|
78 %! global H; |
|
79 %! assert(H,1) |
|
80 %!test |
|
81 %! f; |
|
82 %! clear H |
|
83 %! g; |
|
84 |