Mercurial > hg > octave-nkf
annotate test/test_system.m @ 14276:6b4bd6a86bdd
figure.m: Extend to accepting command form "figure N"
* figure.m: Extend to accepting command form "figure N"
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 28 Jan 2012 13:14:07 -0800 |
parents | 72c96de7a403 |
children | c2411bff11c6 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
14131
diff
changeset
|
1 ## Copyright (C) 2006-2012 John W. Eaton |
7016 | 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 %% test/octave.test/system/cputime-1.m |
20 %!test | |
21 %! [t1, u1, s1] = cputime (); | |
22 %! for i = 1:200 | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
23 %! sin (i); |
5590 | 24 %! endfor |
25 %! [t2, u2, s2] = cputime (); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
26 %! assert (t1, u1 + s1); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
27 %! assert (t2 == u2 + s2); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
28 %! assert (t2 >= t1); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
29 %! assert (u2 >= u2); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
30 %! assert (s2 >= s2); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
31 %!#assert (t1 == u1 + s1 && t2 == u2 + s2 && t2 >= t1 && u2 >= u2 && s2 >= s2); |
5590 | 32 |
33 %% test/octave.test/system/tic-toc-1.m | |
34 %!test | |
35 %! tic (); | |
36 %! sleep (2); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
37 %! assert (toc () > 0); |
5590 | 38 |
39 %% test/octave.test/system/pause-1.m | |
40 %!test | |
41 %! pause (0); | |
42 %! printf_assert ("ok\n"); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
43 %! assert (prog_output_assert ("ok")); |
5590 | 44 |
45 %% test/octave.test/system/pause-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
46 %!error <Invalid call to pause> pause (1, 2) |
5590 | 47 |
48 %% test/octave.test/system/sleep-1.m | |
49 %!test | |
50 %! sleep (0); | |
51 %! printf_assert ("ok\n"); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
52 %! assert (prog_output_assert ("ok")); |
5590 | 53 |
54 %% test/octave.test/system/sleep-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
55 %!error <Invalid call to sleep> sleep () |
5590 | 56 |
57 %% test/octave.test/system/sleep-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
58 %!error <Invalid call to sleep> sleep (1, 2) |
5590 | 59 |
60 %% test/octave.test/system/usleep-1.m | |
61 %!test | |
62 %! usleep (0); | |
63 %! printf_assert ("ok\n"); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
64 %! assert (prog_output_assert ("ok")); |
5590 | 65 |
66 %% test/octave.test/system/usleep-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
67 %!error <Invalid call to usleep> usleep () |
5590 | 68 |
69 %% test/octave.test/system/usleep-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
70 %!error <Invalid call to usleep> usleep (1, 2) |
5590 | 71 |
72 %% test/octave.test/system/rename-1.m | |
73 %!test | |
74 %! from = tmpnam (); | |
75 %! to = tmpnam (); | |
76 %! id = fopen (from, "wb"); | |
77 %! if (id > 0 && fclose (id) == 0) | |
78 %! [s, e] = stat (from); | |
79 %! if (! e) | |
80 %! if (rename (from, to) == 0) | |
81 %! [s, e] = stat (from); | |
82 %! if (e < 0) | |
83 %! [s, e] = stat (to); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
84 %! assert (e == 0); |
5590 | 85 %! unlink (to); |
86 %! endif | |
87 %! endif | |
88 %! endif | |
89 %! endif | |
90 | |
91 %% test/octave.test/system/rename-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
92 %!error <Invalid call to rename> rename () |
5590 | 93 |
94 %% test/octave.test/system/rename-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
95 %!error <Invalid call to rename> rename ("foo", "bar", 1) |
5590 | 96 |
97 %% test/octave.test/system/unlink-1.m | |
98 %!test | |
99 %! nm = tmpnam (); | |
100 %! if ((id = fopen (nm, "wb")) > 0) | |
101 %! [s, err] = stat (nm); | |
102 %! if (! err && fclose (id) == 0 && unlink (nm) == 0) | |
103 %! [s, err] = stat (nm); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
104 %! assert (err < 0); |
5590 | 105 %! endif |
106 %! endif | |
107 | |
108 %% test/octave.test/system/unlink-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
109 %!error <Invalid call to unlink> unlink () |
5590 | 110 |
111 %% test/octave.test/system/unlink-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
112 %!error <Invalid call to unlink> unlink ("foo", 1) |
5590 | 113 |
114 %% test/octave.test/system/readdir-1.m | |
115 %!test | |
5595 | 116 %! [files, status, msg] = readdir (filesep); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
117 %! assert (iscell (files) && status == 0 && strcmp (msg, "")); |
5590 | 118 |
119 %% test/octave.test/system/readdir-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
120 %!error <Invalid call to readdir> readdir () |
5590 | 121 |
122 %% test/octave.test/system/readdir-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
123 %!error <Invalid call to readdir> readdir ("foo", 1) |
5590 | 124 |
125 %% test/octave.test/system/mk-rm-dir-1.m | |
126 %!test | |
127 %! nm = tmpnam (); | |
128 %! e1 = mkdir (nm); | |
129 %! [s2, e2] = stat (nm); | |
130 %! e3 = rmdir (nm); | |
131 %! [s4, e4] = stat (nm); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
132 %! assert ((e1 && strcmp (s2.modestr(1), "d") && e3 && e4 < 0)); |
5590 | 133 |
134 %% test/octave.test/system/mkdir-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
135 %!error <Invalid call to mkdir> mkdir () |
5590 | 136 |
137 %% test/octave.test/system/mkdir-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
138 %!error <Invalid call to mkdir> mkdir ("foo", 1, 2) |
5590 | 139 |
140 %% test/octave.test/system/rmdir-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
141 %!error <Invalid call to rmdir> rmdir () |
5590 | 142 |
143 %% test/octave.test/system/rmdir-2.m | |
5648 | 144 %!test |
6327 | 145 %! crr = confirm_recursive_rmdir (); |
146 %! confirm_recursive_rmdir (0); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
147 %! assert (!rmdir ("foo", "s")); |
6327 | 148 %! confirm_recursive_rmdir (crr); |
5590 | 149 |
150 %% test/octave.test/system/umask-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
151 %!test |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
152 %! orig_umask = umask (0); |
5590 | 153 %! nm = tmpnam (); |
154 %! id = fopen (nm, "wb"); | |
155 %! s1 = stat (nm); | |
156 %! fclose (id); | |
157 %! unlink (nm); | |
158 %! | |
159 %! umask (777); | |
160 %! nm = tmpnam (); | |
161 %! id = fopen (nm, "wb"); | |
162 %! s2 = stat (nm); | |
163 %! fclose (id); | |
164 %! unlink (nm); | |
165 %! | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
166 %! assert (deblank (s1.modestr), "-rw-rw-rw-"); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
167 %! assert (deblank (s2.modestr), "----------"); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
168 %! # Restore original umask value |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
169 %! umask (orig_umask); |
5590 | 170 |
171 %% test/octave.test/system/umask-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
172 %!error <Invalid call to umask> umask () |
5590 | 173 |
174 %% test/octave.test/system/umask-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
175 %!error <Invalid call to umask> umask (1, 2) |
5590 | 176 |
177 %% test/octave.test/system/stat-1.m | |
178 %!test | |
5595 | 179 %! [s, err, msg] = stat (filesep); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
180 %! assert ((err == 0 |
5590 | 181 %! && isstruct (s) |
8629
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
182 %! && isfield (s, "dev") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
183 %! && isfield (s, "ino") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
184 %! && isfield (s, "modestr") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
185 %! && isfield (s, "nlink") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
186 %! && isfield (s, "uid") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
187 %! && isfield (s, "gid") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
188 %! && isfield (s, "size") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
189 %! && isfield (s, "atime") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
190 %! && isfield (s, "mtime") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
191 %! && isfield (s, "ctime") |
7768
a2d9f325b65a
Use isschar instead of deprecated isstr
Rafael Laboissiere <rafael@debian.org>
parents:
7706
diff
changeset
|
192 %! && ischar (msg))); |
5590 | 193 |
194 %% test/octave.test/system/stat-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
195 %!error <Invalid call to stat> stat () |
5590 | 196 |
197 %% test/octave.test/system/stat-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
198 %!error <Invalid call to stat> stat ("foo", 1) |
5590 | 199 |
200 %% test/octave.test/system/lstat-1.m | |
201 %!test | |
5595 | 202 %! [s, err, msg] = lstat (filesep); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
203 %! assert ((err == 0 |
5590 | 204 %! && isstruct (s) |
8629
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
205 %! && isfield (s, "dev") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
206 %! && isfield (s, "ino") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
207 %! && isfield (s, "modestr") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
208 %! && isfield (s, "nlink") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
209 %! && isfield (s, "uid") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
210 %! && isfield (s, "gid") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
211 %! && isfield (s, "size") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
212 %! && isfield (s, "atime") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
213 %! && isfield (s, "mtime") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
214 %! && isfield (s, "ctime") |
7768
a2d9f325b65a
Use isschar instead of deprecated isstr
Rafael Laboissiere <rafael@debian.org>
parents:
7706
diff
changeset
|
215 %! && ischar (msg))); |
5590 | 216 |
217 %% test/octave.test/system/lstat-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
218 %!error <Invalid call to lstat> lstat () |
5590 | 219 |
220 %% test/octave.test/system/lstat-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
221 %!error <Invalid call to lstat> lstat ("foo", 1) |
5590 | 222 |
223 %% test/octave.test/system/glob-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
224 %!assert (iscell (glob ([filesep "*"]))) |
5590 | 225 |
226 %% test/octave.test/system/glob-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
227 %!error <Invalid call to glob> glob () |
5590 | 228 |
229 %% test/octave.test/system/glob-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
230 %!error <Invalid call to glob> glob ("foo", 1) |
5590 | 231 |
232 %% test/octave.test/system/fnmatch-1.m | |
233 %!test | |
234 %! string_fill_char = setstr (0); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
235 %! assert ((fnmatch ("a*a", {"aba"; "xxxba"; "aa"}) == [1; 0; 1] |
5707 | 236 %! && fnmatch ({"a*a"; "b*b"}, "bob") |
237 %! && fnmatch ("x[0-5]*", {"x1"; "x6"}) == [1; 0] | |
238 %! && fnmatch ("x[0-5]*", {"x1"; "x6"; "x001"}) == [1; 0; 1] | |
239 %! && fnmatch ("x???y", {"xabcy"; "xy"}) == [1; 0])); | |
5590 | 240 |
241 %% test/octave.test/system/fnmatch-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
242 %!error <Invalid call to fnmatch> fnmatch () |
5590 | 243 |
244 %% test/octave.test/system/fnmatch-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
245 %!error <Invalid call to fnmatch> fnmatch ("foo", "bar", 3) |
5590 | 246 |
247 %% test/octave.test/system/file_in_path-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
248 %!assert (ischar (file_in_path (path (), "date.m"))) |
5590 | 249 |
250 %% test/octave.test/system/file_in_path-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
251 %!error <invalid option> file_in_path ("foo", "bar", 1) |
5590 | 252 |
253 %% test/octave.test/system/file_in_path-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
254 %!error <Invalid call to file_in_path> file_in_path () |
5590 | 255 |
256 %% test/octave.test/system/file_in_path-4.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
257 %!error <Invalid call to file_in_path> file_in_path ("foo", "bar", "baz", "ooka") |
5590 | 258 |
259 %% test/octave.test/system/tilde_expand-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
260 %!testif HAVE_GETPWUID |
5590 | 261 %! x = getpwuid (getuid ()); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
262 %! assert ((strcmp (x.dir, tilde_expand ("~")) |
5590 | 263 %! && strcmp (x.dir, tilde_expand (sprintf ("~%s", x.name))) |
264 %! && strcmp ("foobar", tilde_expand ("foobar")))); | |
265 | |
266 %% test/octave.test/system/tilde_expand-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
267 %!error <Invalid call to tilde_expand> tilde_expand () |
5590 | 268 |
269 %% test/octave.test/system/tilde_expand-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
270 %!error <Invalid call to tilde_expand> tilde_expand ("str", 2) |
5590 | 271 |
272 %% test/octave.test/system/getpgrp-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
273 %!testif HAVE_GETPGRP |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
274 %! assert (getpgrp () > 0); |
5590 | 275 |
276 %% test/octave.test/system/getpgrp-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
277 %!error <... getpgrp> getpgrp (1) |
5590 | 278 |
279 %% test/octave.test/system/getpid-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
280 %!assert (getpid () > 0) |
5590 | 281 |
282 %% test/octave.test/system/getpid-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
283 %!error <... getpid> getpid (1) |
5590 | 284 |
285 %% test/octave.test/system/getppid-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
286 %!testif HAVE_GETPPID |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
287 %! assert (getppid () > 0); |
5590 | 288 |
289 %% test/octave.test/system/getppid-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
290 %!error <... getppid> getppid (1) |
5590 | 291 |
292 %% test/octave.test/system/geteuid-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
293 %!assert (geteuid () >= 0) |
5590 | 294 |
295 %% test/octave.test/system/geteuid-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
296 %!error <... geteuid> geteuid (1) |
5590 | 297 |
298 %% test/octave.test/system/getuid-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
299 %!assert (getuid () >= 0) |
5590 | 300 |
301 %% test/octave.test/system/getuid-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
302 %!error <... getuid> getuid (1) |
5590 | 303 |
304 %% test/octave.test/system/getegid-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
305 %!assert (getegid () >= 0) |
5590 | 306 |
307 %% test/octave.test/system/getegid-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
308 %!error <... getegid> getegid (1) |
5590 | 309 |
310 %% test/octave.test/system/getgid-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
311 %!assert (getgid () >= 0) |
5590 | 312 |
313 %% test/octave.test/system/getgid-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
314 %!error <... getgid> getgid (1) |
5590 | 315 |
316 %% test/octave.test/system/getenv-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
317 %!assert (getenv ("HOME"), tilde_expand ("~")) |
5590 | 318 |
319 %% test/octave.test/system/getenv-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
320 %!error <Invalid call to getenv> getenv () |
5590 | 321 |
322 %% test/octave.test/system/getenv-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
323 %!error <Invalid call to getenv> getenv ("foo", 1) |
5590 | 324 |
325 %% test/octave.test/system/getenv-4.m | |
326 %!test | |
5781 | 327 %! wns = warning ("query", "Octave:num-to-str"); |
328 %! warning ("on", "Octave:num-to-str"); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
329 %! fail ("getenv (1)", "warning"); |
5781 | 330 %! warning (wns.state, "Octave:num-to-str"); |
5590 | 331 |
332 %% test/octave.test/system/putenv-1.m | |
333 %!test | |
334 %! putenv ("foobar", "baz"); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
335 %! assert (getenv ("foobar"), "baz"); |
5590 | 336 |
337 %% test/octave.test/system/putenv-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
338 %!error <Invalid call to putenv> putenv () |
5590 | 339 |
340 %% test/octave.test/system/putenv-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
341 %!error <Invalid call to putenv> putenv ("foo", "bar", 1) |
5590 | 342 |
343 %% test/octave.test/system/putenv-4.m | |
344 %!test | |
5781 | 345 %! wns = warning ("query", "Octave:num-to-str"); |
346 %! warning ("on", "Octave:num-to-str"); | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
347 %! fail ("putenv (1, 2)","warning"); |
5781 | 348 %! warning (wns.state, "Octave:num-to-str"); |
5590 | 349 |
350 %% test/octave.test/system/cd-1.m | |
351 %!test | |
352 %! xdir = pwd (); | |
353 %! cd / | |
354 %! d1 = pwd (); | |
355 %! cd (xdir); | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
356 %! if (ispc () && ! isunix ()) |
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
357 %! # should be a drive letter |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
358 %! assert (length (d1), 3); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
359 %! assert (d1(2), ":"); |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
360 %! assert (d1(3), "\\"); |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
361 %! else |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
362 %! assert ("/", d1); |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
363 %! endif |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
364 %! assert (pwd(), xdir); |
5590 | 365 |
366 %% test/octave.test/system/cd-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
367 %!error cd (1) |
5590 | 368 |
369 %% test/octave.test/system/pwd-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
370 %!assert (ischar (pwd ())) |
5590 | 371 |
372 %% test/octave.test/system/getpwent-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
373 %!testif HAVE_GETPWENT |
5590 | 374 %! s = getpwent (); |
5678 | 375 %! endpwent (); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
376 %! assert ((isstruct (s) |
8629
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
377 %! && isfield (s, "name") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
378 %! && isfield (s, "passwd") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
379 %! && isfield (s, "uid") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
380 %! && isfield (s, "gid") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
381 %! && isfield (s, "gecos") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
382 %! && isfield (s, "dir") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
383 %! && isfield (s, "shell"))); |
5590 | 384 |
385 %% test/octave.test/system/getpwent-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
386 %!error <Invalid call to getpwent> getpwent (1) |
5590 | 387 |
388 %% test/octave.test/system/getpwuid-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
389 %!testif HAVE_GETPWUID |
5590 | 390 %! x = getpwent (); |
391 %! y = getpwuid (x.uid); | |
5678 | 392 %! endpwent (); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
393 %! assert (strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
5590 | 394 |
395 %% test/octave.test/system/getpwuid-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
396 %!error <Invalid call to getpwuid> getpwuid () |
5590 | 397 |
398 %% test/octave.test/system/getpwuid-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
399 %!error <Invalid call to getpwuid> getpwuid (1, 2) |
5590 | 400 |
401 %% test/octave.test/system/getpwnam-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
402 %!testif HAVE_GETPWNAM |
5590 | 403 %! x = getpwent (); |
404 %! y = getpwnam (x.name); | |
5678 | 405 %! endpwent (); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
406 %! assert (strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
5590 | 407 |
408 %% test/octave.test/system/getpwnam-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
409 %!error <Invalid call to getpwnam> getpwnam () |
5590 | 410 |
411 %% test/octave.test/system/getpwnam-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
412 %!error <Invalid call to getpwnam> getpwnam ("foo", 1) |
5590 | 413 |
414 %% test/octave.test/system/setpwent-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
415 %!testif HAVE_SETPWENT |
5590 | 416 %! x = getpwent (); |
417 %! setpwent (); | |
418 %! y = getpwent (); | |
5678 | 419 %! endpwent (); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
420 %! assert (strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
5590 | 421 |
422 %% test/octave.test/system/setpwent-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
423 %!error <Invalid call to setpwent> setpwent (1) |
5590 | 424 |
425 %% test/octave.test/system/endpwent-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
426 %!error <Invalid call to endpwent> endpwent (1) |
5590 | 427 |
428 %% test/octave.test/system/getgrent-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
429 %!testif HAVE_GETGRENT |
5590 | 430 %! x = getgrent (); |
5678 | 431 %! endgrent (); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
432 %! assert ((isstruct (x) |
8629
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
433 %! && isfield (x, "name") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
434 %! && isfield (x, "passwd") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
435 %! && isfield (x, "gid") |
f07730ed5613
test_system.m: use isfield instead of struct_contains
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
436 %! && isfield (x, "mem"))); |
5590 | 437 |
438 %% test/octave.test/system/getgrent-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
439 %!error <Invalid call to getgrent> getgrent (1) |
5590 | 440 |
441 %% test/octave.test/system/getgrgid-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
442 %!testif HAVE_GETGRGID |
5590 | 443 %! x = getgrent (); |
444 %! y = getgrgid (x.gid); | |
5678 | 445 %! endgrent (); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
446 %! assert (strcmp (x.name, y.name) && x.gid == y.gid); |
5590 | 447 |
448 %% test/octave.test/system/getgrgid-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
449 %!error <Invalid call to getgrgid> getgrgid () |
5590 | 450 |
451 %% test/octave.test/system/getgrgid-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
452 %!error <Invalid call to getgrgid> getgrgid (1, 2) |
5590 | 453 |
454 %% test/octave.test/system/getgrnam-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
455 %!testif HAVE_GETGRNAM |
5590 | 456 %! x = getgrent (); |
457 %! y = getgrnam (x.name); | |
5678 | 458 %! endgrent (); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
459 %! assert (strcmp (x.name, y.name) && x.gid == y.gid); |
5590 | 460 |
461 %% test/octave.test/system/getgrnam-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
462 %!error <Invalid call to getgrnam> getgrnam () |
5590 | 463 |
464 %% test/octave.test/system/getgrnam-3.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
465 %!error <Invalid call to getgrnam> getgrnam ("foo", 1) |
5590 | 466 |
467 %% test/octave.test/system/setgrent-1.m | |
7706
30564b8b19f5
Fix various tests under Win32.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7562
diff
changeset
|
468 %!testif HAVE_SETGRENT |
5590 | 469 %! x = getgrent (); |
470 %! setgrent (); | |
471 %! y = getgrent (); | |
5678 | 472 %! endgrent (); |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
473 %! assert (strcmp (x.name, y.name) && x.gid == y.gid); |
5590 | 474 |
475 %% test/octave.test/system/setgrent-2.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
476 %!error <Invalid call to setgrent> setgrent (1) |
5590 | 477 |
478 %% test/octave.test/system/endgrent-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
479 %!error <Invalid call to endgrent> endgrent (1) |
5590 | 480 |
481 %% test/octave.test/system/isieee-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
482 %!assert (isieee () == 1 || isieee () == 0) |
5590 | 483 |
484 %% test/octave.test/system/octave_config_info-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
485 %!assert (isstruct (octave_config_info ())) |
5590 | 486 |
487 %% test/octave.test/system/getrusage-1.m | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
13915
diff
changeset
|
488 %!assert (isstruct (getrusage ())) |
5590 | 489 |