diff options
author | Jonathan Stowe <gellyfish@gellyfish.com> | 2001-08-29 10:25:49 +0100 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2001-08-29 08:06:12 +0000 |
commit | e66df07321b4a66bafe24ee0eb6883a0274bbb47 (patch) | |
tree | b57ee994b7c89026e7d35b26cfd61928abdcc6e4 /lib/Shell.t | |
parent | 8815fa0e033a75de9e84da580e92dda1e9189d58 (diff) | |
download | perl-e66df07321b4a66bafe24ee0eb6883a0274bbb47.tar.gz |
Re: The hitlist of untested modules.
Message-ID: <Pine.LNX.4.33.0108290923320.29273-100000@orpheus.gellyfish.com>
Start of tests for Shell.pm (make Schwern poorer!)
p4raw-id: //depot/perl@11784
Diffstat (limited to 'lib/Shell.t')
-rw-r--r-- | lib/Shell.t | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/lib/Shell.t b/lib/Shell.t new file mode 100644 index 0000000000..5ff0b16087 --- /dev/null +++ b/lib/Shell.t @@ -0,0 +1,59 @@ +#!./perl + +use Test::More tests => 4; + +BEGIN { use_ok('Shell'); } + +my $Is_VMS = $^O eq 'VMS'; +my $Is_MSWin32 = $^O eq 'MSWin32'; +my $Is_NetWare = $^O eq 'NetWare'; + +$Shell::capture_stderr = 1; # + +# Now test that that works .. + +my $tmpfile = 'sht0001'; + +while ( -f $tmpfile ) +{ + $tmpfile++; +} + +END { -f $tmpfile && unlink $tmpfile }; + + + +open(SAVERR,">&STDERR") ; +open(STDERR, ">$tmpfile"); + +xXx(); # Ok someone could have a program called this :( + +ok( !(-s $tmpfile) ,'$Shell::capture_stderr'); + +$Shell::capture_stderr = 0; # + +# someone will have to fill in the blanks for other platforms + +if ( $Is_VMS ) +{ + skip "Please implement VMS test", 2; + ok(1); + ok(1); +} +elsif( $Is_MSWin32 ) +{ + ok(dir(),'Execute command'); + + my @files = dir('*.*'); + + ok(@files, 'Quoted arguments'); +} +else +{ + ok(ls(),'Execute command'); + + my @files = ls('*'); + + ok(@files,'Quoted arguments'); + +} |