Mercurial > hg > octave-lojdl
changeset 2740:1f9d2f699399
[project @ 1997-02-25 08:53:54 by jwe]
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/cd-1.m @@ -0,0 +1,5 @@ +xdir = pwd (); +cd / +d1 = pwd (); +cd (xdir) +strcmp ("/", d1) && strcmp (pwd (), xdir)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/computer-1.m @@ -0,0 +1,1 @@ +isstr (computer ()) && computer () == octave_config_info ("target_host_type")
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/computer-2.m @@ -0,0 +1,1 @@ +computer (2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/endgrent-1.m @@ -0,0 +1,1 @@ +endgrent (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/endpwent-1.m @@ -0,0 +1,1 @@ +endpwent (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getegid-1.m @@ -0,0 +1,1 @@ +getegid () > 0
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getegid-2.m @@ -0,0 +1,1 @@ +getegid (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getenv-1.m @@ -0,0 +1,1 @@ +strcmp (getenv ("HOME"), tilde_expand ("~"))
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getenv-2.m @@ -0,0 +1,1 @@ +getenv ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getenv-3.m @@ -0,0 +1,1 @@ +getenv ("foo", 1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getenv-4.m @@ -0,0 +1,1 @@ +getenv (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/geteuid-1.m @@ -0,0 +1,1 @@ +geteuid () > 0
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/geteuid-2.m @@ -0,0 +1,1 @@ +geteuid (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgid-1.m @@ -0,0 +1,1 @@ +getgid () > 0
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgid-2.m @@ -0,0 +1,1 @@ +getgid (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgrent-1.m @@ -0,0 +1,6 @@ +x = getgrent (); +(is_struct (x) + && struct_contains (x, "name") + && struct_contains (x, "passwd") + && struct_contains (x, "gid") + && struct_contains (x, "mem"))
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgrent-2.m @@ -0,0 +1,1 @@ +getgrent (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgrgid-1.m @@ -0,0 +1,4 @@ +x = getgrent (); +y = getgrgid (x.gid); + +strcmp (x.name, y.name) && x.gid == y.gid
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgrgid-2.m @@ -0,0 +1,1 @@ +getgrgid ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgrgid-3.m @@ -0,0 +1,1 @@ +getgrgid (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgrnam-1.m @@ -0,0 +1,4 @@ +x = getgrent (); +y = getgrnam (x.name); + +strcmp (x.name, y.name) && x.gid == y.gid
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgrnam-2.m @@ -0,0 +1,1 @@ +getgrnam ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getgrnam-3.m @@ -0,0 +1,1 @@ +getgrnam ("foo", 1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpgrp-1.m @@ -0,0 +1,1 @@ +getpgrp () > 0
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpgrp-2.m @@ -0,0 +1,1 @@ +getpgrp (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpid-1.m @@ -0,0 +1,1 @@ +getpid () > 0
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpid-2.m @@ -0,0 +1,1 @@ +getpid (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getppid-1.m @@ -0,0 +1,1 @@ +getppid () > 0
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getppid-2.m @@ -0,0 +1,1 @@ +getppid (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpwent-1.m @@ -0,0 +1,9 @@ +s = getpwent (); +(is_struct (s) + && struct_contains (s, "name") + && struct_contains (s, "passwd") + && struct_contains (s, "uid") + && struct_contains (s, "gid") + && struct_contains (s, "gecos") + && struct_contains (s, "dir") + && struct_contains (s, "shell"))
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpwent-2.m @@ -0,0 +1,1 @@ +getpwent (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpwnam-1.m @@ -0,0 +1,4 @@ +x = getpwent (); +y = getpwnam (x.name); + +strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpwnam-2.m @@ -0,0 +1,1 @@ +getpwnam ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpwnam-3.m @@ -0,0 +1,1 @@ +getpwnam ("foo", 1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpwuid-1.m @@ -0,0 +1,4 @@ +x = getpwent (); +y = getpwuid (x.uid); + +strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpwuid-2.m @@ -0,0 +1,1 @@ +getpwuid ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getpwuid-3.m @@ -0,0 +1,1 @@ +getpwuid (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getrusage-1.m @@ -0,0 +1,1 @@ +is_struct (getrusage ())
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getuid-1.m @@ -0,0 +1,1 @@ +getuid () > 0
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/getuid-2.m @@ -0,0 +1,1 @@ +getuid (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/isieee-1.m @@ -0,0 +1,1 @@ +isieee () == 1 || isieee () == 0
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/octave_config_info-1.m @@ -0,0 +1,1 @@ +is_struct (octave_config_info ())
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/putenv-1.m @@ -0,0 +1,2 @@ +putenv ("foobar", "baz"); +strcmp (getenv ("foobar"), "baz")
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/putenv-2.m @@ -0,0 +1,1 @@ +putenv ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/putenv-3.m @@ -0,0 +1,1 @@ +putenv ("foo", "bar", 1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/putenv-4.m @@ -0,0 +1,1 @@ +putenv (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/pwd-1.m @@ -0,0 +1,1 @@ +isstr (pwd ()) && strcmp (pwd (), PWD)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/setgrent-1.m @@ -0,0 +1,5 @@ +x = getgrent (); +setgrent (); +y = getgrent (); + +strcmp (x.name, y.name) && x.gid == y.gid
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/setgrent-2.m @@ -0,0 +1,1 @@ +setgrent (1)
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/setpwent-1.m @@ -0,0 +1,5 @@ +x = getpwent (); +setpwent (); +y = getpwent (); + +strcmp (x.name, y.name) && x.uid == y.uid && x.gid == y.gid
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/setpwent-2.m @@ -0,0 +1,1 @@ +setpwent (1)
--- a/test/octave.test/system/system.exp +++ b/test/octave.test/system/system.exp @@ -1,4 +1,7 @@ -# time +set test time-1 +set prog_output "ans = 1" +do_test time-1.m + # ctime # gmtime # localtime @@ -6,7 +9,7 @@ # asctime # strftime # clock -# daet +# date # etime # cputime # is_leap_year @@ -35,30 +38,223 @@ # dup2 # waitpid # fcntl -# getpgrp -# getpid -# getppid -# geteuid -# getuid -# getegid -# getgid -# getenv -# putenv -# cd -# pwd -# ls -# getpwent -# getpwuid -# getpwnam -# setpwent -# endpwent -# getgrent -# getgrgid -# getgrnam -# setgrent -# endgrent -# computer -# isieee -# version -# octave_config_info -# getrusage + +set test getpgrp-1 +set prog_output "ans = 1" +do_test getpgrp-1.m + +set test getpgrp-2 +set prog_output "\n... getpgrp" +do_test getpgrp-2.m + +set test getpid-1 +set prog_output "ans = 1" +do_test getpid-1.m + +set test getpid-2 +set prog_output "\n... getpid" +do_test getpid-2.m + +set test getppid-1 +set prog_output "ans = 1" +do_test getppid-1.m + +set test getppid-2 +set prog_output "\n... getppid" +do_test getppid-2.m + +set test geteuid-1 +set prog_output "ans = 1" +do_test geteuid-1.m + +set test geteuid-2 +set prog_output "\n... geteuid" +do_test geteuid-2.m + +set test getuid-1 +set prog_output "ans = 1" +do_test getuid-1.m + +set test getuid-2 +set prog_output "\n... getuid" +do_test getuid-2.m + +set test getegid-1 +set prog_output "ans = 1" +do_test getegid-1.m + +set test getegid-2 +set prog_output "\n... getegid" +do_test getegid-2.m + +set test getgid-1 +set prog_output "ans = 1" +do_test getgid-1.m + +set test getgid-2 +set prog_output "\n... getgid" +do_test getgid-2.m + +set test getenv-1 +set prog_output "ans = 1" +do_test getenv-1.m + +set test getenv-2 +set prog_output "\n... getenv:.*" +do_test getenv-2.m + +set test getenv-3 +set prog_output "\n... getenv:.*" +do_test getenv-3.m + +set test getenv-4 +set prog_output "error:.*" +do_test getenv-4.m + +set test putenv-1 +set prog_output "ans = 1" +do_test putenv-1.m + +set test putenv-2 +set prog_output "\n... putenv:.*" +do_test putenv-2.m + +set test putenv-3 +set prog_output "\n... putenv:.*" +do_test putenv-3.m + +set test putenv-4 +set prog_output "error:.*" +do_test putenv-4.m + +set test cd-1 +set prog_output "ans = 1" +do_test cd-1.m + +set test cd-2 +set prog_output "error:.*" +do_test cd-2.m + +set test pwd-1 +set prog_output "ans = 1" +do_test pwd-1.m + +set test ls-1 +set prog_output "error:.*" +do_test ls-1.m + +set test getpwent-1 +set prog_output "ans = 1" +do_test getpwent-1.m + +set test getpwent-2 +set prog_output "\n... getpwent:.*" +do_test getpwent-2.m + +set test getpwuid-1 +set prog_output "ans = 1" +do_test getpwuid-1.m + +set test getpwuid-2 +set prog_output "\n... getpwuid:.*" +do_test getpwuid-2.m + +set test getpwuid-3 +set prog_output "\n... getpwuid:.*" +do_test getpwuid-3.m + +set test getpwnam-1 +set prog_output "ans = 1" +do_test getpwnam-1.m + +set test getpwnam-2 +set prog_output "\n... getpwnam:.*" +do_test getpwnam-2.m + +set test getpwnam-3 +set prog_output "\n... getpwnam:.*" +do_test getpwnam-3.m + +set test setpwent-1 +set prog_output "ans = 1" +do_test setpwent-1.m + +set test setpwent-2 +set prog_output "\n... setpwent:.*" +do_test setpwent-2.m + +set test endpwent-1 +set prog_output "\n... endpwent:.*" +do_test endpwent-1.m + +set test getgrent-1 +set prog_output "ans = 1" +do_test getgrent-1.m + +set test getgrent-2 +set prog_output "\n... getgrent:.*" +do_test getgrent-2.m + +set test getgrgid-1 +set prog_output "ans = 1" +do_test getgrgid-1.m + +set test getgrgid-2 +set prog_output "\n... getgrgid:.*" +do_test getgrgid-2.m + +set test getgrgid-3 +set prog_output "\n... getgrgid:.*" +do_test getgrgid-3.m + +set test getgrnam-1 +set prog_output "ans = 1" +do_test getgrnam-1.m + +set test getgrnam-2 +set prog_output "\n... getgrnam:.*" +do_test getgrnam-2.m + +set test getgrnam-3 +set prog_output "\n... getgrnam:.*" +do_test getgrnam-3.m + +set test setgrent-1 +set prog_output "ans = 1" +do_test setgrent-1.m + +set test setgrent-2 +set prog_output "\n... setgrent:.*" +do_test setgrent-2.m + +set test endgrent-1 +set prog_output "\n... endgrent:.*" +do_test endgrent-1.m + +set test computer-1 +set prog_output "ans = 1" +do_test computer-1.m + +set test computer-2 +set prog_output "warning:.*" +do_test computer-2.m + +set test isieee-1 +set prog_output "ans = 1" +do_test isieee-1.m + +set test version-1 +set prog_output "ans = 1" +do_test version-1.m + +set test version-2 +set prog_output "warning:.*" +do_test version-2.m + +set test octave_config_info-1 +set prog_output "ans = 1" +do_test octave_config_info-1.m + +set test getrusage-1 +set prog_output "ans = 1" +do_test getrusage-1.m
new file mode 100644 --- /dev/null +++ b/test/octave.test/system/time-1.m @@ -0,0 +1,1 @@ +time () > 0