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 |
5648
|
248 %!test |
|
249 %! crr = confirm_recursive_rmdir; |
|
250 %! confirm_recursive_rmdir = 0; |
|
251 %! assert(!rmdir ("foo", "s")); |
|
252 %! confirm_recursive_rmdir = crr; |
5590
|
253 |
|
254 %% XXX FIXME XXX This test messes up the path it seems!! Why? |
|
255 %% test/octave.test/system/umask-1.m |
|
256 %!#test |
|
257 %! umask (0); |
|
258 %! nm = tmpnam (); |
|
259 %! id = fopen (nm, "wb"); |
|
260 %! s1 = stat (nm); |
|
261 %! fclose (id); |
|
262 %! unlink (nm); |
|
263 %! |
|
264 %! umask (777); |
|
265 %! nm = tmpnam (); |
|
266 %! id = fopen (nm, "wb"); |
|
267 %! s2 = stat (nm); |
|
268 %! fclose (id); |
|
269 %! unlink (nm); |
|
270 %! |
|
271 %! assert(strcmp (s1.modestr, "-rw-rw-rw-") && strcmp (s2.modestr, "----------")); |
|
272 |
|
273 %% test/octave.test/system/umask-2.m |
|
274 %!error <... umask:.*> umask (); |
|
275 |
|
276 %% test/octave.test/system/umask-3.m |
|
277 %!error <... umask:.*> umask (1, 2); |
|
278 |
|
279 %% test/octave.test/system/stat-1.m |
|
280 %!test |
5595
|
281 %! [s, err, msg] = stat (filesep); |
5590
|
282 %! assert((err == 0 |
|
283 %! && isstruct (s) |
|
284 %! && struct_contains (s, "dev") |
|
285 %! && struct_contains (s, "ino") |
|
286 %! && struct_contains (s, "modestr") |
|
287 %! && struct_contains (s, "nlink") |
|
288 %! && struct_contains (s, "uid") |
|
289 %! && struct_contains (s, "gid") |
|
290 %! && struct_contains (s, "size") |
|
291 %! && struct_contains (s, "atime") |
|
292 %! && struct_contains (s, "mtime") |
|
293 %! && struct_contains (s, "ctime") |
|
294 %! && isstr (msg))); |
|
295 |
|
296 %% test/octave.test/system/stat-2.m |
|
297 %!error <... stat:.*> stat (); |
|
298 |
|
299 %% test/octave.test/system/stat-3.m |
|
300 %!error <... stat:.*> stat ("foo", 1); |
|
301 |
|
302 %% test/octave.test/system/lstat-1.m |
|
303 %!test |
5595
|
304 %! [s, err, msg] = lstat (filesep); |
5590
|
305 %! assert((err == 0 |
|
306 %! && isstruct (s) |
|
307 %! && struct_contains (s, "dev") |
|
308 %! && struct_contains (s, "ino") |
|
309 %! && struct_contains (s, "modestr") |
|
310 %! && struct_contains (s, "nlink") |
|
311 %! && struct_contains (s, "uid") |
|
312 %! && struct_contains (s, "gid") |
|
313 %! && struct_contains (s, "size") |
|
314 %! && struct_contains (s, "atime") |
|
315 %! && struct_contains (s, "mtime") |
|
316 %! && struct_contains (s, "ctime") |
|
317 %! && isstr (msg))); |
|
318 |
|
319 %% test/octave.test/system/lstat-2.m |
|
320 %!error <... lstat:.*> lstat (); |
|
321 |
|
322 %% test/octave.test/system/lstat-3.m |
|
323 %!error <... lstat:.*> lstat ("foo", 1); |
|
324 |
|
325 %% test/octave.test/system/glob-1.m |
5595
|
326 %!assert(iscell (glob ([filesep "*"]))); |
5590
|
327 |
|
328 %% test/octave.test/system/glob-2.m |
|
329 %!error <... glob:*> glob (); |
|
330 |
|
331 %% test/octave.test/system/glob-3.m |
|
332 %!error <... glob:.*> glob ("foo", 1); |
|
333 |
|
334 %% test/octave.test/system/fnmatch-1.m |
|
335 %!test |
|
336 %! string_fill_char = setstr (0); |
5707
|
337 %! assert((fnmatch ("a*a", {"aba"; "xxxba"; "aa"}) == [1; 0; 1] |
|
338 %! && fnmatch ({"a*a"; "b*b"}, "bob") |
|
339 %! && fnmatch ("x[0-5]*", {"x1"; "x6"}) == [1; 0] |
|
340 %! && fnmatch ("x[0-5]*", {"x1"; "x6"; "x001"}) == [1; 0; 1] |
|
341 %! && fnmatch ("x???y", {"xabcy"; "xy"}) == [1; 0])); |
5590
|
342 |
|
343 %% test/octave.test/system/fnmatch-2.m |
|
344 %!error <... fnmatch:.*> fnmatch (); |
|
345 |
|
346 %% test/octave.test/system/fnmatch-3.m |
|
347 %!error <... fnmatch:.*> fnmatch ("foo", "bar", 3); |
|
348 |
|
349 %% test/octave.test/system/file_in_path-1.m |
|
350 %!assert(isstr (file_in_path (LOADPATH, "date.m"))); |
|
351 |
|
352 %% test/octave.test/system/file_in_path-2.m |
|
353 %!error <invalid option> file_in_path ("foo", "bar", 1); |
|
354 |
|
355 %% test/octave.test/system/file_in_path-3.m |
|
356 %!error <... file_in_path:.*> file_in_path (); |
|
357 |
|
358 %% test/octave.test/system/file_in_path-4.m |
|
359 %!error <... file_in_path:.*> file_in_path ("foo", "bar", "baz", "ooka"); |
|
360 |
|
361 %% test/octave.test/system/tilde_expand-1.m |
|
362 %!test |
|
363 %! x = getpwuid (getuid ()); |
|
364 %! assert((strcmp (x.dir, tilde_expand ("~")) |
|
365 %! && strcmp (x.dir, tilde_expand (sprintf ("~%s", x.name))) |
|
366 %! && strcmp ("foobar", tilde_expand ("foobar")))); |
|
367 |
|
368 %% test/octave.test/system/tilde_expand-2.m |
|
369 %!error <... tilde_expand:.*> tilde_expand (); |
|
370 |
|
371 %% test/octave.test/system/tilde_expand-3.m |
|
372 %!error <... tilde_expand:.*> tilde_expand ("str", 2); |
|
373 |
|
374 %% test/octave.test/system/getpgrp-1.m |
|
375 %!assert(getpgrp () > 0); |
|
376 |
|
377 %% test/octave.test/system/getpgrp-2.m |
|
378 %!error <... getpgrp> getpgrp (1); |
|
379 |
|
380 %% test/octave.test/system/getpid-1.m |
|
381 %!assert(getpid () > 0); |
|
382 |
|
383 %% test/octave.test/system/getpid-2.m |
|
384 %!error <... getpid> getpid (1); |
|
385 |
|
386 %% test/octave.test/system/getppid-1.m |
|
387 %!assert(getppid () > 0); |
|
388 |
|
389 %% test/octave.test/system/getppid-2.m |
|
390 %!error <... getppid> getppid (1); |
|
391 |
|
392 %% test/octave.test/system/geteuid-1.m |
|
393 %!assert(geteuid () >= 0); |
|
394 |
|
395 %% test/octave.test/system/geteuid-2.m |
|
396 %!error <... geteuid> geteuid (1); |
|
397 |
|
398 %% test/octave.test/system/getuid-1.m |
|
399 %!assert(getuid () >= 0); |
|
400 |
|
401 %% test/octave.test/system/getuid-2.m |
|
402 %!error <... getuid> getuid (1); |
|
403 |
|
404 %% test/octave.test/system/getegid-1.m |
|
405 %!assert(getegid () >= 0); |
|
406 |
|
407 %% test/octave.test/system/getegid-2.m |
|
408 %!error <... getegid> getegid (1); |
|
409 |
|
410 %% test/octave.test/system/getgid-1.m |
|
411 %!assert(getgid () >= 0); |
|
412 |
|
413 %% test/octave.test/system/getgid-2.m |
|
414 %!error <... getgid> getgid (1); |
|
415 |
|
416 %% test/octave.test/system/getenv-1.m |
|
417 %!assert(strcmp (getenv ("HOME"), tilde_expand ("~"))); |
|
418 |
|
419 %% test/octave.test/system/getenv-2.m |
|
420 %!error <... getenv:.*> getenv (); |
|
421 |
|
422 %% test/octave.test/system/getenv-3.m |
|
423 %!error <... getenv:.*> getenv ("foo", 1); |
|
424 |
|
425 %% test/octave.test/system/getenv-4.m |
|
426 %!test |
|
427 %! wns = warn_num_to_str; |
|
428 %! warn_num_to_str = 1; |
|
429 %! fail("getenv (1)","warning"); |
|
430 %! warn_num_to_str = wns; |
|
431 |
|
432 %% test/octave.test/system/putenv-1.m |
|
433 %!test |
|
434 %! putenv ("foobar", "baz"); |
|
435 %! assert(strcmp (getenv ("foobar"), "baz")); |
|
436 |
|
437 %% test/octave.test/system/putenv-2.m |
|
438 %!error <... putenv:.*> putenv (); |
|
439 |
|
440 %% test/octave.test/system/putenv-3.m |
|
441 %!error <... putenv:.*> putenv ("foo", "bar", 1); |
|
442 |
|
443 %% test/octave.test/system/putenv-4.m |
|
444 %!test |
|
445 %! wns = warn_num_to_str; |
|
446 %! warn_num_to_str = 1; |
|
447 %! fail("putenv (1, 2)","warning"); |
|
448 %! warn_num_to_str = wns; |
|
449 |
|
450 %% test/octave.test/system/cd-1.m |
|
451 %!test |
|
452 %! xdir = pwd (); |
|
453 %! cd / |
|
454 %! d1 = pwd (); |
|
455 %! cd (xdir); |
|
456 %! assert("/", d1); |
|
457 %! assert(pwd(), xdir); |
|
458 |
|
459 %% test/octave.test/system/cd-2.m |
|
460 %!error cd (1); |
|
461 |
|
462 %% test/octave.test/system/pwd-1.m |
|
463 %!assert(isstr (pwd ())); |
|
464 |
|
465 %% test/octave.test/system/ls-1.m |
|
466 %!error ls (1); |
|
467 |
|
468 %% test/octave.test/system/getpwent-1.m |
|
469 %!test |
|
470 %! s = getpwent (); |
5678
|
471 %! endpwent (); |
5590
|
472 %! assert((isstruct (s) |
|
473 %! && struct_contains (s, "name") |
|
474 %! && struct_contains (s, "passwd") |
|
475 %! && struct_contains (s, "uid") |
|
476 %! && struct_contains (s, "gid") |
|
477 %! && struct_contains (s, "gecos") |
|
478 %! && struct_contains (s, "dir") |
|
479 %! && struct_contains (s, "shell"))); |
|
480 |
|
481 %% test/octave.test/system/getpwent-2.m |
|
482 %!error <... getpwent:.*> getpwent (1); |
|
483 |
|
484 %% test/octave.test/system/getpwuid-1.m |
|
485 %!test |
|
486 %! x = getpwent (); |
|
487 %! y = getpwuid (x.uid); |
5678
|
488 %! endpwent (); |
5590
|
489 %! assert(strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
|
490 |
|
491 %% test/octave.test/system/getpwuid-2.m |
|
492 %!error <... getpwuid:.*> getpwuid (); |
|
493 |
|
494 %% test/octave.test/system/getpwuid-3.m |
|
495 %!error <... getpwuid:.*> getpwuid (1, 2); |
|
496 |
|
497 %% test/octave.test/system/getpwnam-1.m |
|
498 %!test |
|
499 %! x = getpwent (); |
|
500 %! y = getpwnam (x.name); |
5678
|
501 %! endpwent (); |
5590
|
502 %! assert(strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
|
503 |
|
504 %% test/octave.test/system/getpwnam-2.m |
|
505 %!error <... getpwnam:.*> getpwnam (); |
|
506 |
|
507 %% test/octave.test/system/getpwnam-3.m |
|
508 %!error <... getpwnam:.*> getpwnam ("foo", 1); |
|
509 |
|
510 %% test/octave.test/system/setpwent-1.m |
|
511 %!test |
|
512 %! x = getpwent (); |
|
513 %! setpwent (); |
|
514 %! y = getpwent (); |
5678
|
515 %! endpwent (); |
5590
|
516 %! assert(strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid); |
|
517 |
|
518 %% test/octave.test/system/setpwent-2.m |
|
519 %!error <... setpwent:.*> setpwent (1); |
|
520 |
|
521 %% test/octave.test/system/endpwent-1.m |
|
522 %!error <... endpwent:.*> endpwent (1); |
|
523 |
|
524 %% test/octave.test/system/getgrent-1.m |
|
525 %!test |
|
526 %! x = getgrent (); |
5678
|
527 %! endgrent (); |
5590
|
528 %! assert((isstruct (x) |
|
529 %! && struct_contains (x, "name") |
|
530 %! && struct_contains (x, "passwd") |
|
531 %! && struct_contains (x, "gid") |
|
532 %! && struct_contains (x, "mem"))); |
|
533 |
|
534 %% test/octave.test/system/getgrent-2.m |
|
535 %!error <... getgrent:.*> getgrent (1); |
|
536 |
|
537 %% test/octave.test/system/getgrgid-1.m |
|
538 %!test |
|
539 %! x = getgrent (); |
|
540 %! y = getgrgid (x.gid); |
5678
|
541 %! endgrent (); |
5590
|
542 %! assert(strcmp (x.name, y.name) && x.gid == y.gid); |
|
543 |
|
544 %% test/octave.test/system/getgrgid-2.m |
|
545 %!error <... getgrgid:.*> getgrgid (); |
|
546 |
|
547 %% test/octave.test/system/getgrgid-3.m |
|
548 %!error <... getgrgid:.*> getgrgid (1, 2); |
|
549 |
|
550 %% test/octave.test/system/getgrnam-1.m |
|
551 %!test |
|
552 %! x = getgrent (); |
|
553 %! y = getgrnam (x.name); |
5678
|
554 %! endgrent (); |
5590
|
555 %! assert(strcmp (x.name, y.name) && x.gid == y.gid); |
|
556 |
|
557 %% test/octave.test/system/getgrnam-2.m |
|
558 %!error <... getgrnam:.*> getgrnam (); |
|
559 |
|
560 %% test/octave.test/system/getgrnam-3.m |
|
561 %!error <... getgrnam:.*> getgrnam ("foo", 1); |
|
562 |
|
563 %% test/octave.test/system/setgrent-1.m |
|
564 %!test |
|
565 %! x = getgrent (); |
|
566 %! setgrent (); |
|
567 %! y = getgrent (); |
5678
|
568 %! endgrent (); |
5590
|
569 %! assert(strcmp (x.name, y.name) && x.gid == y.gid); |
|
570 |
|
571 %% test/octave.test/system/setgrent-2.m |
|
572 %!error <... setgrent:.*> setgrent (1); |
|
573 |
|
574 %% test/octave.test/system/endgrent-1.m |
|
575 %!error <... endgrent:.*> endgrent (1); |
|
576 |
|
577 %% test/octave.test/system/computer-1.m |
|
578 %!assert((isstr (computer ()) |
|
579 %! && computer () == octave_config_info ("canonical_host_type"))); |
|
580 |
|
581 %% test/octave.test/system/computer-2.m |
|
582 %!warning a =computer(2); |
|
583 |
|
584 %% test/octave.test/system/isieee-1.m |
|
585 %!assert(isieee () == 1 || isieee () == 0); |
|
586 |
|
587 %% test/octave.test/system/version-1.m |
|
588 %!assert(isstr (version ()) && strcmp (version (), OCTAVE_VERSION)); |
|
589 |
|
590 %% test/octave.test/system/version-2.m |
|
591 %!warning version (1); |
|
592 |
|
593 %% test/octave.test/system/octave_config_info-1.m |
|
594 %!assert(isstruct (octave_config_info ())); |
|
595 |
|
596 %% test/octave.test/system/getrusage-1.m |
|
597 %!assert(isstruct (getrusage ())); |
|
598 |