5590
|
1 %% Automatically generated from DejaGNU files |
|
2 |
|
3 %% test/octave.test/system/time-1.m |
|
4 %!assert(time () > 0); |
|
5 |
|
6 %% test/octave.test/system/ctime-1.m |
|
7 %!test |
|
8 %! t = time (); |
|
9 %! assert(strcmp (asctime (localtime (t)), ctime (t))); |
|
10 |
|
11 %% test/octave.test/system/ctime-2.m |
|
12 %!error ctime (); |
|
13 |
|
14 %% test/octave.test/system/ctime-3.m |
|
15 %!error ctime (1, 2); |
|
16 |
|
17 %% test/octave.test/system/gmtime-1.m |
|
18 %!test |
|
19 %! ts = gmtime (time ()); |
|
20 %! assert((isstruct (ts) |
|
21 %! && struct_contains (ts, "usec") |
|
22 %! && struct_contains (ts, "year") |
|
23 %! && struct_contains (ts, "mon") |
|
24 %! && struct_contains (ts, "mday") |
|
25 %! && struct_contains (ts, "sec") |
|
26 %! && struct_contains (ts, "min") |
|
27 %! && struct_contains (ts, "wday") |
|
28 %! && struct_contains (ts, "hour") |
|
29 %! && struct_contains (ts, "isdst") |
|
30 %! && struct_contains (ts, "yday"))); |
|
31 |
|
32 %% test/octave.test/system/gmtime-2.m |
|
33 %!error <... gmtime:.*> gmtime (); |
|
34 |
|
35 %% test/octave.test/system/gmtime-3.m |
|
36 %!error <... gmtime:.*> gmtime (1, 2); |
|
37 |
|
38 %% test/octave.test/system/localtime-1.m |
|
39 %!test |
|
40 %! ts = localtime (time ()); |
|
41 %! assert((isstruct (ts) |
|
42 %! && struct_contains (ts, "usec") |
|
43 %! && struct_contains (ts, "year") |
|
44 %! && struct_contains (ts, "mon") |
|
45 %! && struct_contains (ts, "mday") |
|
46 %! && struct_contains (ts, "sec") |
|
47 %! && struct_contains (ts, "min") |
|
48 %! && struct_contains (ts, "wday") |
|
49 %! && struct_contains (ts, "hour") |
|
50 %! && struct_contains (ts, "isdst") |
|
51 %! && struct_contains (ts, "yday"))); |
|
52 |
|
53 %% test/octave.test/system/localtime-2.m |
|
54 %!error <... localtime:.*> localtime (); |
|
55 |
|
56 %% test/octave.test/system/localtime-3.m |
|
57 %!error <... localtime:.*> localtime (1, 2); |
|
58 |
|
59 %% test/octave.test/system/mktime-1.m |
|
60 %!test |
|
61 %! t = time (); |
|
62 %! assert(fix (mktime (localtime (t))) == fix (t)); |
|
63 |
|
64 %% test/octave.test/system/mktime-2.m |
|
65 %!error <... mktime:.*> mktime (); |
|
66 |
|
67 %% test/octave.test/system/mktime-3.m |
|
68 %!error <... mktime:.*> mktime (1, 2, 3); |
|
69 |
|
70 %% test/octave.test/system/asctime-1.m |
|
71 %!test |
|
72 %! t = time (); |
|
73 %! assert(strcmp (asctime (localtime (t)), ctime (t))); |
|
74 |
|
75 %% test/octave.test/system/asctime-2.m |
|
76 %!error asctime (); |
|
77 |
|
78 %% test/octave.test/system/asctime-3.m |
|
79 %!error asctime (1, 2); |
|
80 |
|
81 %% test/octave.test/system/strftime-1.m |
|
82 %!assert((isstr (strftime ("%%%n%t%H%I%k%l", localtime (time ()))) |
|
83 %! && isstr (strftime ("%M%p%r%R%s%S%T", localtime (time ()))) |
|
84 %! && isstr (strftime ("%X%Z%z%a%A%b%B", localtime (time ()))) |
|
85 %! && isstr (strftime ("%c%C%d%e%D%h%j", localtime (time ()))) |
|
86 %! && isstr (strftime ("%m%U%w%W%x%y%Y", localtime (time ()))))); |
|
87 |
|
88 %% test/octave.test/system/strftime-2.m |
|
89 %!error <... strftime:.*> strftime (); |
|
90 |
|
91 %% test/octave.test/system/strftime-3.m |
|
92 %!error <... strftime:.*> strftime ("foo", localtime (time ()), 1); |
|
93 |
|
94 %% test/octave.test/system/clock-1.m |
|
95 %!test |
|
96 %! t1 = clock; |
|
97 %! t2 = str2num (strftime ("[%Y, %m, %d, %H, %M, %S]", localtime (time ()))); |
|
98 %! assert(etime (t1, t2) < 1); |
|
99 |
|
100 %% test/octave.test/system/date-1.m |
|
101 %!assert(strcmp (date (), strftime ("%d-%b-%Y", localtime (time ())))); |
|
102 |
|
103 %% test/octave.test/system/etime-1.m |
|
104 %!test |
|
105 %! t1 = [1993, 8, 20, 4, 56, 1]; |
|
106 %! t2 = [1993, 8, 21, 4, 56, 1]; |
|
107 %! t3 = [1993, 8, 20, 5, 56, 1]; |
|
108 %! t4 = [1993, 8, 20, 4, 57, 1]; |
|
109 %! t5 = [1993, 8, 20, 4, 56, 14]; |
|
110 %! |
|
111 %! assert((etime (t2, t1) == 86400 && etime (t3, t1) == 3600 |
|
112 %! && etime (t4, t1) == 60 && etime (t5, t1) == 13)); |
|
113 |
|
114 %% test/octave.test/system/etime-2.m |
|
115 %!error etime (); |
|
116 |
|
117 %% test/octave.test/system/etime-3.m |
|
118 %!error etime (1, 2, 3); |
|
119 |
|
120 %% test/octave.test/system/cputime-1.m |
|
121 %!test |
|
122 %! [t1, u1, s1] = cputime (); |
|
123 %! for i = 1:200 |
|
124 %! sin (i); |
|
125 %! endfor |
|
126 %! [t2, u2, s2] = cputime (); |
|
127 %! assert(t1 == u1 + s1 && t2 == u2 + s2 && t2 >= t1 && u2 >= u2 && s2 >= s2); |
|
128 |
|
129 %% test/octave.test/system/is_leap_year-1.m |
|
130 %!assert((is_leap_year (2000) == 1 && is_leap_year (1976) == 1 |
|
131 %! && is_leap_year (1000) == 0 && is_leap_year (1800) == 0 |
|
132 %! && is_leap_year (1600) == 1)); |
|
133 |
|
134 %% test/octave.test/system/is_leap_year-2.m |
|
135 %!error is_leap_year (1, 2); |
|
136 |
|
137 %% test/octave.test/system/tic-toc-1.m |
|
138 %!test |
|
139 %! tic (); |
|
140 %! sleep (2); |
|
141 %! assert(toc () > 0); |
|
142 |
|
143 %% test/octave.test/system/pause-1.m |
|
144 %!test |
|
145 %! pause (0); |
|
146 %! printf_assert ("ok\n"); |
|
147 %! assert(prog_output_assert("ok")); |
|
148 |
|
149 %% test/octave.test/system/pause-2.m |
|
150 %!error <... pause:.*> pause (1, 2); |
|
151 |
|
152 %% test/octave.test/system/sleep-1.m |
|
153 %!test |
|
154 %! sleep (0); |
|
155 %! printf_assert ("ok\n"); |
|
156 %! assert(prog_output_assert("ok")); |
|
157 |
|
158 %% test/octave.test/system/sleep-2.m |
|
159 %!error <... sleep:.*> sleep (); |
|
160 |
|
161 %% test/octave.test/system/sleep-3.m |
|
162 %!error <... sleep:.*> sleep (1, 2); |
|
163 |
|
164 %% test/octave.test/system/usleep-1.m |
|
165 %!test |
|
166 %! usleep (0); |
|
167 %! printf_assert ("ok\n"); |
|
168 %! assert(prog_output_assert("ok")); |
|
169 |
|
170 %% test/octave.test/system/usleep-2.m |
|
171 %!error <... usleep:.*> usleep (); |
|
172 |
|
173 %% test/octave.test/system/usleep-3.m |
|
174 %!error <... usleep:.*> usleep (1, 2); |
|
175 |
|
176 %% test/octave.test/system/rename-1.m |
|
177 %!test |
|
178 %! from = tmpnam (); |
|
179 %! to = tmpnam (); |
|
180 %! id = fopen (from, "wb"); |
|
181 %! if (id > 0 && fclose (id) == 0) |
|
182 %! [s, e] = stat (from); |
|
183 %! if (! e) |
|
184 %! if (rename (from, to) == 0) |
|
185 %! [s, e] = stat (from); |
|
186 %! if (e < 0) |
|
187 %! [s, e] = stat (to); |
|
188 %! assert(e == 0); |
|
189 %! unlink (to); |
|
190 %! endif |
|
191 %! endif |
|
192 %! endif |
|
193 %! endif |
|
194 |
|
195 %% test/octave.test/system/rename-2.m |
|
196 %!error <... rename:.*> rename (); |
|
197 |
|
198 %% test/octave.test/system/rename-3.m |
|
199 %!error <... rename:.*> rename ("foo", "bar", 1); |
|
200 |
|
201 %% test/octave.test/system/unlink-1.m |
|
202 %!test |
|
203 %! nm = tmpnam (); |
|
204 %! if ((id = fopen (nm, "wb")) > 0) |
|
205 %! [s, err] = stat (nm); |
|
206 %! if (! err && fclose (id) == 0 && unlink (nm) == 0) |
|
207 %! [s, err] = stat (nm); |
|
208 %! assert(err < 0); |
|
209 %! endif |
|
210 %! endif |
|
211 |
|
212 %% test/octave.test/system/unlink-2.m |
|
213 %!error <... unlink:.*> unlink (); |
|
214 |
|
215 %% test/octave.test/system/unlink-3.m |
|
216 %!error <... unlink:.*> unlink ("foo", 1); |
|
217 |
|
218 %% test/octave.test/system/readdir-1.m |
|
219 %!test |
5595
|
220 %! [files, status, msg] = readdir (filesep); |
5590
|
221 %! assert(iscell (files) && status == 0 && msg == ""); |
|
222 |
|
223 %% test/octave.test/system/readdir-2.m |
|
224 %!error <... readdir:.*> readdir (); |
|
225 |
|
226 %% test/octave.test/system/readdir-3.m |
|
227 %!error <... readdir:.*> readdir ("foo", 1); |
|
228 |
|
229 %% test/octave.test/system/mk-rm-dir-1.m |
|
230 %!test |
|
231 %! nm = tmpnam (); |
|
232 %! e1 = mkdir (nm); |
|
233 %! [s2, e2] = stat (nm); |
|
234 %! e3 = rmdir (nm); |
|
235 %! [s4, e4] = stat (nm); |
|
236 %! assert((e1 && strcmp (s2.modestr(1), "d") && e3 && e4 < 0)); |
|
237 |
|
238 %% test/octave.test/system/mkdir-1.m |
|
239 %!error <... mkdir:.*> mkdir (); |
|
240 |
|
241 %% test/octave.test/system/mkdir-2.m |
|
242 %!error <... mkdir:.*> mkdir ("foo", 1); |
|
243 |
|
244 %% test/octave.test/system/rmdir-1.m |
|
245 %!error <... rmdir:.*> rmdir (); |
|
246 |
|
247 %% test/octave.test/system/rmdir-2.m |
|
248 %!assert(!rmdir ("foo", 1)); |
|
249 |
|
250 %% XXX FIXME XXX This test messes up the path it seems!! Why? |
|
251 %% test/octave.test/system/umask-1.m |
|
252 %!#test |
|
253 %! umask (0); |
|
254 %! nm = tmpnam (); |
|
255 %! id = fopen (nm, "wb"); |
|
256 %! s1 = stat (nm); |
|
257 %! fclose (id); |
|
258 %! unlink (nm); |
|
259 %! |
|
260 %! umask (777); |
|
261 %! nm = tmpnam (); |
|
262 %! id = fopen (nm, "wb"); |
|
263 %! s2 = stat (nm); |
|
264 %! fclose (id); |
|
265 %! unlink (nm); |
|
266 %! |
|
267 %! assert(strcmp (s1.modestr, "-rw-rw-rw-") && strcmp (s2.modestr, "----------")); |
|
268 |
|
269 %% test/octave.test/system/umask-2.m |
|
270 %!error <... umask:.*> umask (); |
|
271 |
|
272 %% test/octave.test/system/umask-3.m |
|
273 %!error <... umask:.*> umask (1, 2); |
|
274 |
|
275 %% test/octave.test/system/stat-1.m |
|
276 %!test |
5595
|
277 %! [s, err, msg] = stat (filesep); |
5590
|
278 %! assert((err == 0 |
|
279 %! && isstruct (s) |
|
280 %! && struct_contains (s, "dev") |
|
281 %! && struct_contains (s, "ino") |
|
282 %! && struct_contains (s, "modestr") |
|
283 %! && struct_contains (s, "nlink") |
|
284 %! && struct_contains (s, "uid") |
|
285 %! && struct_contains (s, "gid") |
|
286 %! && struct_contains (s, "size") |
|
287 %! && struct_contains (s, "atime") |
|
288 %! && struct_contains (s, "mtime") |
|
289 %! && struct_contains (s, "ctime") |
|
290 %! && isstr (msg))); |
|
291 |
|
292 %% test/octave.test/system/stat-2.m |
|
293 %!error <... stat:.*> stat (); |
|
294 |
|
295 %% test/octave.test/system/stat-3.m |
|
296 %!error <... stat:.*> stat ("foo", 1); |
|
297 |
|
298 %% test/octave.test/system/lstat-1.m |
|
299 %!test |
5595
|
300 %! [s, err, msg] = lstat (filesep); |
5590
|
301 %! assert((err == 0 |
|
302 %! && isstruct (s) |
|
303 %! && struct_contains (s, "dev") |
|
304 %! && struct_contains (s, "ino") |
|
305 %! && struct_contains (s, "modestr") |
|
306 %! && struct_contains (s, "nlink") |
|
307 %! && struct_contains (s, "uid") |
|
308 %! && struct_contains (s, "gid") |
|
309 %! && struct_contains (s, "size") |
|
310 %! && struct_contains (s, "atime") |
|
311 %! && struct_contains (s, "mtime") |
|
312 %! && struct_contains (s, "ctime") |
|
313 %! && isstr (msg))); |
|
314 |
|
315 %% test/octave.test/system/lstat-2.m |
|
316 %!error <... lstat:.*> lstat (); |
|
317 |
|
318 %% test/octave.test/system/lstat-3.m |
|
319 %!error <... lstat:.*> lstat ("foo", 1); |
|
320 |
|
321 %% test/octave.test/system/glob-1.m |
5595
|
322 %!assert(iscell (glob ([filesep "*"]))); |
5590
|
323 |
|
324 %% test/octave.test/system/glob-2.m |
|
325 %!error <... glob:*> glob (); |
|
326 |
|
327 %% test/octave.test/system/glob-3.m |
|
328 %!error <... glob:.*> glob ("foo", 1); |
|
329 |
|
330 %% test/octave.test/system/fnmatch-1.m |
|
331 %!test |
|
332 %! string_fill_char = setstr (0); |
|
333 %! assert((fnmatch ("a*a", ["aba"; "xxxba"; "aa"]) == [1; 0; 1] |
|
334 %! && fnmatch (["a*a"; "b*b"], "bob") |
|
335 %! && fnmatch ("x[0-5]*", ["x1"; "x6"]) == [1; 0] |
|
336 %! && fnmatch ("x[0-5]*", ["x1"; "x6"; "x001"]) == [1; 0; 1] |
|
337 %! && fnmatch ("x???y", ["xabcy"; "xy"]) == [1; 0])); |
|
338 |
|
339 %% test/octave.test/system/fnmatch-2.m |
|
340 %!error <... fnmatch:.*> fnmatch (); |
|
341 |
|
342 %% test/octave.test/system/fnmatch-3.m |
|
343 %!error <... fnmatch:.*> fnmatch ("foo", "bar", 3); |
|
344 |
|
345 %% test/octave.test/system/file_in_path-1.m |
|
346 %!assert(isstr (file_in_path (LOADPATH, "date.m"))); |
|
347 |
|
348 %% test/octave.test/system/file_in_path-2.m |
|
349 %!error <invalid option> file_in_path ("foo", "bar", 1); |
|
350 |
|
351 %% test/octave.test/system/file_in_path-3.m |
|
352 %!error <... file_in_path:.*> file_in_path (); |
|
353 |
|
354 %% test/octave.test/system/file_in_path-4.m |
|
355 %!error <... file_in_path:.*> file_in_path ("foo", "bar", "baz", "ooka"); |
|
356 |
|
357 %% test/octave.test/system/tilde_expand-1.m |
|
358 %!test |
|
359 %! x = getpwuid (getuid ()); |
|
360 %! assert((strcmp (x.dir, tilde_expand ("~")) |
|
361 %! && strcmp (x.dir, tilde_expand (sprintf ("~%s", x.name))) |
|
362 %! && strcmp ("foobar", tilde_expand ("foobar")))); |
|
363 |
|
364 %% test/octave.test/system/tilde_expand-2.m |
|
365 %!error <... tilde_expand:.*> tilde_expand (); |
|
366 |
|
367 %% test/octave.test/system/tilde_expand-3.m |
|
368 %!error <... tilde_expand:.*> tilde_expand ("str", 2); |
|
369 |
|
370 %% test/octave.test/system/getpgrp-1.m |
|
371 %!assert(getpgrp () > 0); |
|
372 |
|
373 %% test/octave.test/system/getpgrp-2.m |
|
374 %!error <... getpgrp> getpgrp (1); |
|
375 |
|
376 %% test/octave.test/system/getpid-1.m |
|
377 %!assert(getpid () > 0); |
|
378 |
|
379 %% test/octave.test/system/getpid-2.m |
|
380 %!error <... getpid> getpid (1); |
|
381 |
|
382 %% test/octave.test/system/getppid-1.m |
|
383 %!assert(getppid () > 0); |
|
384 |
|
385 %% test/octave.test/system/getppid-2.m |
|
386 %!error <... getppid> getppid (1); |
|
387 |
|
388 %% test/octave.test/system/geteuid-1.m |
|
389 %!assert(geteuid () >= 0); |
|
390 |
|
391 %% test/octave.test/system/geteuid-2.m |
|
392 %!error <... geteuid> geteuid (1); |
|
393 |
|
394 %% test/octave.test/system/getuid-1.m |
|
395 %!assert(getuid () >= 0); |
|
396 |
|
397 %% test/octave.test/system/getuid-2.m |
|
398 %!error <... getuid> getuid (1); |
|
399 |
|
400 %% test/octave.test/system/getegid-1.m |
|
401 %!assert(getegid () >= 0); |
|
402 |
|
403 %% test/octave.test/system/getegid-2.m |
|
404 %!error <... getegid> getegid (1); |
|
405 |
|
406 %% test/octave.test/system/getgid-1.m |
|
407 %!assert(getgid () >= 0); |
|
408 |
|
409 %% test/octave.test/system/getgid-2.m |
|
410 %!error <... getgid> getgid (1); |
|
411 |
|
412 %% test/octave.test/system/getenv-1.m |
|
413 %!assert(strcmp (getenv ("HOME"), tilde_expand ("~"))); |
|
414 |
|
415 %% test/octave.test/system/getenv-2.m |
|
416 %!error <... getenv:.*> getenv (); |
|
417 |
|
418 %% test/octave.test/system/getenv-3.m |
|
419 %!error <... getenv:.*> getenv ("foo", 1); |
|
420 |
|
421 %% test/octave.test/system/getenv-4.m |
|
422 %!test |
|
423 %! wns = warn_num_to_str; |
|
424 %! warn_num_to_str = 1; |
|
425 %! fail("getenv (1)","warning"); |
|
426 %! warn_num_to_str = wns; |
|
427 |
|
428 %% test/octave.test/system/putenv-1.m |
|
429 %!test |
|
430 %! putenv ("foobar", "baz"); |
|
431 %! assert(strcmp (getenv ("foobar"), "baz")); |
|
432 |
|
433 %% test/octave.test/system/putenv-2.m |
|
434 %!error <... putenv:.*> putenv (); |
|
435 |
|
436 %% test/octave.test/system/putenv-3.m |
|
437 %!error <... putenv:.*> putenv ("foo", "bar", 1); |
|
438 |
|
439 %% test/octave.test/system/putenv-4.m |
|
440 %!test |
|
441 %! wns = warn_num_to_str; |
|
442 %! warn_num_to_str = 1; |
|
443 %! fail("putenv (1, 2)","warning"); |
|
444 %! warn_num_to_str = wns; |
|
445 |
|
446 %% test/octave.test/system/cd-1.m |
|
447 %!test |
|
448 %! xdir = pwd (); |
|
449 %! cd / |
|
450 %! d1 = pwd (); |
|
451 %! cd (xdir); |
|
452 %! assert("/", d1); |
|
453 %! assert(pwd(), xdir); |
|
454 |
|
455 %% test/octave.test/system/cd-2.m |
|
456 %!error cd (1); |
|
457 |
|
458 %% test/octave.test/system/pwd-1.m |
|
459 %!assert(isstr (pwd ())); |
|
460 |
|
461 %% test/octave.test/system/ls-1.m |
|
462 %!error ls (1); |
|
463 |
|
464 %% test/octave.test/system/getpwent-1.m |
|
465 %!test |
|
466 %! s = getpwent (); |
|
467 %! assert((isstruct (s) |
|
468 %! && struct_contains (s, "name") |
|
469 %! && struct_contains (s, "passwd") |
|
470 %! && struct_contains (s, "uid") |
|
471 %! && struct_contains (s, "gid") |
|
472 %! && struct_contains (s, "gecos") |
|
473 %! && struct_contains (s, "dir") |
|
474 %! && struct_contains (s, "shell"))); |
|
475 |
|
476 %% test/octave.test/system/getpwent-2.m |
|
477 %!error <... getpwent:.*> getpwent (1); |
|
478 |
|
479 %% test/octave.test/system/getpwuid-1.m |
|
480 %!test |
|
481 %! x = getpwent (); |
|
482 %! y = getpwuid (x.uid); |
|
483 %! |
|
484 %! assert(strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
|
485 |
|
486 %% test/octave.test/system/getpwuid-2.m |
|
487 %!error <... getpwuid:.*> getpwuid (); |
|
488 |
|
489 %% test/octave.test/system/getpwuid-3.m |
|
490 %!error <... getpwuid:.*> getpwuid (1, 2); |
|
491 |
|
492 %% test/octave.test/system/getpwnam-1.m |
|
493 %!test |
|
494 %! x = getpwent (); |
|
495 %! y = getpwnam (x.name); |
|
496 %! |
|
497 %! assert(strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
|
498 |
|
499 %% test/octave.test/system/getpwnam-2.m |
|
500 %!error <... getpwnam:.*> getpwnam (); |
|
501 |
|
502 %% test/octave.test/system/getpwnam-3.m |
|
503 %!error <... getpwnam:.*> getpwnam ("foo", 1); |
|
504 |
|
505 %% test/octave.test/system/setpwent-1.m |
|
506 %!test |
|
507 %! x = getpwent (); |
|
508 %! setpwent (); |
|
509 %! y = getpwent (); |
|
510 %! |
|
511 %! assert(strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
|
512 |
|
513 %% test/octave.test/system/setpwent-2.m |
|
514 %!error <... setpwent:.*> setpwent (1); |
|
515 |
|
516 %% test/octave.test/system/endpwent-1.m |
|
517 %!error <... endpwent:.*> endpwent (1); |
|
518 |
|
519 %% test/octave.test/system/getgrent-1.m |
|
520 %!test |
|
521 %! x = getgrent (); |
|
522 %! assert((isstruct (x) |
|
523 %! && struct_contains (x, "name") |
|
524 %! && struct_contains (x, "passwd") |
|
525 %! && struct_contains (x, "gid") |
|
526 %! && struct_contains (x, "mem"))); |
|
527 |
|
528 %% test/octave.test/system/getgrent-2.m |
|
529 %!error <... getgrent:.*> getgrent (1); |
|
530 |
|
531 %% test/octave.test/system/getgrgid-1.m |
|
532 %!test |
|
533 %! x = getgrent (); |
|
534 %! y = getgrgid (x.gid); |
|
535 %! |
|
536 %! assert(strcmp (x.name, y.name) && x.gid == y.gid); |
|
537 |
|
538 %% test/octave.test/system/getgrgid-2.m |
|
539 %!error <... getgrgid:.*> getgrgid (); |
|
540 |
|
541 %% test/octave.test/system/getgrgid-3.m |
|
542 %!error <... getgrgid:.*> getgrgid (1, 2); |
|
543 |
|
544 %% test/octave.test/system/getgrnam-1.m |
|
545 %!test |
|
546 %! x = getgrent (); |
|
547 %! y = getgrnam (x.name); |
|
548 %! |
|
549 %! assert(strcmp (x.name, y.name) && x.gid == y.gid); |
|
550 |
|
551 %% test/octave.test/system/getgrnam-2.m |
|
552 %!error <... getgrnam:.*> getgrnam (); |
|
553 |
|
554 %% test/octave.test/system/getgrnam-3.m |
|
555 %!error <... getgrnam:.*> getgrnam ("foo", 1); |
|
556 |
|
557 %% test/octave.test/system/setgrent-1.m |
|
558 %!test |
|
559 %! x = getgrent (); |
|
560 %! setgrent (); |
|
561 %! y = getgrent (); |
|
562 %! |
|
563 %! assert(strcmp (x.name, y.name) && x.gid == y.gid); |
|
564 |
|
565 %% test/octave.test/system/setgrent-2.m |
|
566 %!error <... setgrent:.*> setgrent (1); |
|
567 |
|
568 %% test/octave.test/system/endgrent-1.m |
|
569 %!error <... endgrent:.*> endgrent (1); |
|
570 |
|
571 %% test/octave.test/system/computer-1.m |
|
572 %!assert((isstr (computer ()) |
|
573 %! && computer () == octave_config_info ("canonical_host_type"))); |
|
574 |
|
575 %% test/octave.test/system/computer-2.m |
|
576 %!warning a =computer(2); |
|
577 |
|
578 %% test/octave.test/system/isieee-1.m |
|
579 %!assert(isieee () == 1 || isieee () == 0); |
|
580 |
|
581 %% test/octave.test/system/version-1.m |
|
582 %!assert(isstr (version ()) && strcmp (version (), OCTAVE_VERSION)); |
|
583 |
|
584 %% test/octave.test/system/version-2.m |
|
585 %!warning version (1); |
|
586 |
|
587 %% test/octave.test/system/octave_config_info-1.m |
|
588 %!assert(isstruct (octave_config_info ())); |
|
589 |
|
590 %% test/octave.test/system/getrusage-1.m |
|
591 %!assert(isstruct (getrusage ())); |
|
592 |