Navigation

Operators and Keywords

Function List:

C++ API

test_system.m File Reference


Functions

id cputime ()
 !assert (t1==u1+s1 &&t2==u2+s2 &&t2 >=t1 &&u2 >=u2 &&s2 >=s2)
id tic ()
 !sleep (2)
 !assert (toc() > 0)
pause ()
 !printf_assert ("ok\n")
 !assert (prog_output_assert("ok"))
sleep ()
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)
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 ()
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 ()
getpgrp ()
getpid ()
getppid ()
geteuid ()
getuid ()
getegid ()
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)
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 ()
setpwent ()
endpwent ()
id getgrent ()
 !endgrent ()
 !assert ((isstruct(x)%!&&isfield(x,"name")%!&&isfield(x,"passwd")%!&&isfield(x,"gid")%!&&isfield(x,"mem")))
id getgrgid ()
id getgrnam ()
 !setgrent ()
setgrent ()
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)

Function Documentation

!assert ( (isstruct(x)%!&&isfield(x,"name")%!&&isfield(x,"passwd")%!&&isfield(x,"gid")%!&&isfield(x,"mem"))   ) 

!assert ( strcmp(x.name, y.name)&&x.  uid = =y.uid &&x.gid==y.gid  ) 

!assert ( (isstruct(s)%!&&isfield(s,"name")%!&&isfield(s,"passwd")%!&&isfield(s,"uid")%!&&isfield(s,"gid")%!&&isfield(s,"gecos")%!&&isfield(s,"dir")%!&&isfield(s,"shell"))   ) 

! endif !assert ( pwd()  ,
xdir   
)

! 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 ( iscell(files)&&  status = =0 &&strcmp(msg,"")  ) 

!assert (  ) 

!assert ( e  = =0  ) 

!assert ( prog_output_assert("ok")   ) 

!assert ( toc()  ,
 
)

!assert ( t1  = =u1+s1 &&t2==u2+s2 &&t2 >=t1 &&u2 >=u2 &&s2 >=s2  ) 

!cd ( xdir   ) 

!confirm_recursive_rmdir ( crr   ) 

!confirm_recursive_rmdir (  ) 

!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"))  ,
 
)

!if (  ) 

!if ( e  ) 

!if ( id  ,
0 &&  fcloseid = = 0 
)

!printf_assert ( "ok\n"   ) 

!setgrent (  ) 

!setpwent (  ) 

!sleep (  ) 

!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]


Variable Documentation

! cd !d1 = pwd ()

!e1 = mkdir (nm)

!e3 = stat (nm) rmdir (nm)

!endfor[t2, u2, s2] = cputime ()

!id = fopen (from, "wb")

!nm = tmpnam ()

!s1 = stat (nm)

!s2 = stat (nm)

!to = tmpnam ()

!y = getpwuid (x.uid)

e = stat (from)

err = stat (nm)

! for i

Initial value:

 1:200
%! sin (i)

to

Initial value:

= 0)
%!       [s