Functions | |
id | cputime () |
!assert (t1==u1+s1 &&t2==u2+s2 &&t2 >=t1 &&u2 >=u2 &&s2 >=s2) | |
id | tic () |
!sleep (2) | |
!assert (toc() > 0) | |
0 | pause () |
!printf_assert ("ok\n") | |
!assert (prog_output_assert("ok")) | |
0 | sleep () |
0 | usleep () |
id | tmpnam () |
!if (id > 0 &&fclose(id)==0)%![s | |
!if (!e)%!if(rename(from | |
!if (e< 0)%![s | |
!assert (e==0) | |
!unlink (to) | |
id | rename () |
!if ((id=fopen(nm,"wb")) > 0)%![s | |
!if (!err &&fclose(id)==0 &&unlink(nm)==0)%![s | |
!assert (err< 0) | |
id | unlink () |
filesep | readdir () |
!assert (iscell(files)&&status==0 &&strcmp(msg,"")) | |
!assert ((e1 &&strcmp(s2.modestr(1),"d")&&e3 &&e4< 0)) | |
id | mkdir () |
id | rmdir () |
id | confirm_recursive_rmdir () |
!confirm_recursive_rmdir (0) | |
!assert (!rmdir("foo","s")) | |
!confirm_recursive_rmdir (crr) | |
0 | umask () |
!fclose (id) | |
!unlink (nm) | |
!umask (777) | |
!assert (strcmp(s1.modestr,"-rw-rw-rw-")&&strcmp(s2.modestr,"----------")) | |
filesep | stat () |
!assert ((err==0%!&&isstruct(s)%!&&isfield(s,"dev")%!&&isfield(s,"ino")%!&&isfield(s,"modestr")%!&&isfield(s,"nlink")%!&&isfield(s,"uid")%!&&isfield(s,"gid")%!&&isfield(s,"size")%!&&isfield(s,"atime")%!&&isfield(s,"mtime")%!&&isfield(s,"ctime")%!&&ischar(msg))) | |
filesep | lstat () |
iscell(glob([filesep"*"] | assert () |
id | glob () |
0 | setstr () |
!assert ((fnmatch("a*a",{"aba";"xxxba";"aa"})==[1;0;1]%!&&fnmatch({"a*a";"b*b"},"bob")%!&&fnmatch("x[0-5]*",{"x1";"x6"})==[1;0]%!&&fnmatch("x[0-5]*",{"x1";"x6";"x001"})==[1;0;1]%!&&fnmatch("x???y",{"xabcy";"xy"})==[1;0])) | |
id | fnmatch () |
ischar(file_in_path(path( | m () |
"foo","bar", 1 | file_in_path () |
getuid( | getpwuid () |
!assert ((strcmp(x.dir, tilde_expand("~"))%!&&strcmp(x.dir, tilde_expand(sprintf("~%s", x.name)))%!&&strcmp("foobar", tilde_expand("foobar")))) | |
id | tilde_expand () |
1 | getpgrp () |
1 | getpid () |
1 | getppid () |
1 | geteuid () |
1 | getuid () |
1 | getegid () |
1 | getgid () |
id | getenv () |
"query","Octave:num-to-str" | warning () |
!warning ("on","Octave:num-to-str") | |
!fail ("getenv (1)","warning") | |
!warning (wns.state,"Octave:num-to-str") | |
"foobar","baz" | putenv () |
!assert (strcmp(getenv("foobar"),"baz")) | |
!fail ("putenv (1, 2)","warning") | |
id | pwd () |
!cd (xdir) | |
!if (ispc()&&!isunix())%!%!assert(length(d1) | |
!assert (d1(2),":") | |
!assert (d1(3),"\\") | |
!else | !assert ("/", d1) |
!endif | !assert (pwd(), xdir) |
1 | cd () |
id | getpwent () |
!endpwent () | |
!assert ((isstruct(s)%!&&isfield(s,"name")%!&&isfield(s,"passwd")%!&&isfield(s,"uid")%!&&isfield(s,"gid")%!&&isfield(s,"gecos")%!&&isfield(s,"dir")%!&&isfield(s,"shell"))) | |
!assert (strcmp(x.name, y.name)&&x.uid==y.uid &&x.gid==y.gid) | |
id | getpwnam () |
!setpwent () | |
1 | setpwent () |
1 | endpwent () |
id | getgrent () |
!endgrent () | |
!assert ((isstruct(x)%!&&isfield(x,"name")%!&&isfield(x,"passwd")%!&&isfield(x,"gid")%!&&isfield(x,"mem"))) | |
id | getgrgid () |
id | getgrnam () |
!setgrent () | |
1 | setgrent () |
1 | endgrent () |
isieee( | isieee () |
Variables | |
!for | i |
!endfor [t2, u2, s2] = cputime () | |
!to = tmpnam () | |
!id = fopen (from, "wb") | |
e = stat (from) | |
to | |
err = stat (nm) | |
!e1 = mkdir (nm) | |
!e3 = stat (nm) rmdir (nm) | |
!nm = tmpnam () | |
!s1 = stat (nm) | |
!s2 = stat (nm) | |
!cd | !d1 = pwd () |
!y = getpwuid (x.uid) |
!assert | ( | (isstruct(x)%!&&isfield(x,"name")%!&&isfield(x,"passwd")%!&&isfield(x,"gid")%!&&isfield(x,"mem")) | ) |
!assert | ( | (isstruct(s)%!&&isfield(s,"name")%!&&isfield(s,"passwd")%!&&isfield(s,"uid")%!&&isfield(s,"gid")%!&&isfield(s,"gecos")%!&&isfield(s,"dir")%!&&isfield(s,"shell")) | ) |
! else !assert | ( | "/" | , | |
d1 | ||||
) |
!assert | ( | d1(3) | , | |
"\\" | ||||
) |
!assert | ( | d1(2) | , | |
":" | ||||
) |
!assert | ( | strcmp(getenv("foobar"),"baz") | ) |
!assert | ( | (strcmp(x.dir, tilde_expand("~"))%!&&strcmp(x.dir, tilde_expand(sprintf("~%s", x.name)))%!&&strcmp("foobar", tilde_expand("foobar"))) | ) |
!assert | ( | (fnmatch("a*a",{"aba";"xxxba";"aa"})==[1;0;1]%!&&fnmatch({"a*a";"b*b"},"bob")%!&&fnmatch("x[0-5]*",{"x1";"x6"})==[1;0]%!&&fnmatch("x[0-5]*",{"x1";"x6";"x001"})==[1;0;1]%!&&fnmatch("x???y",{"xabcy";"xy"})==[1;0]) | ) |
!assert | ( | (err==0%!&&isstruct(s)%!&&isfield(s,"dev")%!&&isfield(s,"ino")%!&&isfield(s,"modestr")%!&&isfield(s,"nlink")%!&&isfield(s,"uid")%!&&isfield(s,"gid")%!&&isfield(s,"size")%!&&isfield(s,"atime")%!&&isfield(s,"mtime")%!&&isfield(s,"ctime")%!&&ischar(msg)) | ) |
!assert | ( | strcmp(s1.modestr,"-rw-rw-rw-")&&strcmp(s2.modestr,"----------") | ) |
!assert | ( | ! | rmdir"foo","s" | ) |
!assert | ( | (e1 &&strcmp(s2.modestr(1),"d")&&e3 &&e4< 0) | ) |
!assert | ( | ) |
!assert | ( | e | = =0 |
) |
!assert | ( | prog_output_assert("ok") | ) |
!assert | ( | toc() | , | |
0 | ||||
) |
!cd | ( | xdir | ) |
!confirm_recursive_rmdir | ( | crr | ) |
!confirm_recursive_rmdir | ( | 0 | ) |
!endgrent | ( | ) |
!endpwent | ( | ) |
!fail | ( | "putenv (1, 2)" | , | |
"warning" | ||||
) |
!fail | ( | "getenv (1)" | , | |
"warning" | ||||
) |
!fclose | ( | id | ) |
!if | ( | ispc()&&!isunix() | ) |
!if | ( | !err && | fcloseid = = 0 && unlink (nm) == 0 |
) |
!if | ( | (id=fopen(nm,"wb")) | , | |
0 | ||||
) |
!if | ( | ) |
!if | ( | ! | e | ) |
!if | ( | id | , | |
0 && | fcloseid = = 0 | |||
) |
!printf_assert | ( | "ok\n" | ) |
!setgrent | ( | ) |
!setpwent | ( | ) |
!sleep | ( | 2 | ) |
!umask | ( | 777 | ) |
!unlink | ( | nm | ) |
!unlink | ( | to | ) |
!warning | ( | wns. | state, | |
"Octave:num-to-str" | ||||
) |
!warning | ( | "on" | , | |
"Octave:num-to-str" | ||||
) |
iscell (glob ([filesep "*"] assert | ( | ) | [virtual] |
1 cd | ( | ) | [virtual] |
id confirm_recursive_rmdir | ( | ) | [virtual] |
id cputime | ( | ) | [virtual] |
endgrent | ( | ) | [virtual] |
endpwent | ( | ) | [virtual] |
foo bar baz ooka file_in_path | ( | ) | [virtual] |
foo bar fnmatch | ( | ) | [virtual] |
getegid | ( | ) | [virtual] |
id getenv | ( | ) | [virtual] |
geteuid | ( | ) | [virtual] |
getgid | ( | ) | [virtual] |
id getgrent | ( | ) | [virtual] |
getgrgid | ( | ) | [virtual] |
foo getgrnam | ( | ) | [virtual] |
getpgrp | ( | ) | [virtual] |
getpid | ( | ) | [virtual] |
getppid | ( | ) | [virtual] |
id getpwent | ( | ) | [virtual] |
foo getpwnam | ( | ) | [virtual] |
getpwuid | ( | ) | [virtual] |
getuid | ( | ) | [virtual] |
foo glob | ( | ) | [virtual] |
isieee ( isieee | ( | ) | [virtual] |
foo lstat | ( | ) | [virtual] |
ischar (file_in_path (path ( m | ( | ) | [virtual] |
foo mkdir | ( | ) | [virtual] |
pause | ( | ) | [virtual] |
foo bar putenv | ( | ) | [virtual] |
id pwd | ( | ) | [virtual] |
foo readdir | ( | ) | [virtual] |
foo bar rename | ( | ) | [virtual] |
id rmdir | ( | ) | [virtual] |
1 setgrent | ( | ) | [virtual] |
1 setpwent | ( | ) | [virtual] |
0 setstr | ( | ) | [virtual] |
sleep | ( | ) | [virtual] |
foo stat | ( | ) | [virtual] |
id tic | ( | ) | [virtual] |
tilde_expand | ( | ) | [virtual] |
id tmpnam | ( | ) | [virtual] |
umask | ( | ) | [virtual] |
foo unlink | ( | ) | [virtual] |
usleep | ( | ) | [virtual] |
"query", "Octave:num-to-str" warning | ( | ) | [virtual] |
! cd !d1 = pwd () |
!e1 = mkdir (nm) |
!e3 = stat (nm) rmdir (nm) |
!id = fopen (from, "wb") |
!nm = tmpnam () |
!s1 = stat (nm) |
!s2 = stat (nm) |
!to = tmpnam () |
!y = getpwuid (x.uid) |
e = stat (from) |
err = stat (nm) |