8 use Test::More tests => 4;
10 BEGIN { use_ok('Shell'); }
12 my $Is_VMS = $^O eq 'VMS';
13 my $Is_MSWin32 = $^O eq 'MSWin32';
14 my $Is_NetWare = $^O eq 'NetWare';
16 $Shell::capture_stderr = 1; #
18 # Now test that that works ..
20 my $tmpfile = 'sht0001';
27 END { -f $tmpfile && (open STDERR, '>&SAVERR' and unlink $tmpfile) };
31 open(SAVERR,">&STDERR") ;
32 open(STDERR, ">$tmpfile");
34 xXx(); # Ok someone could have a program called this :(
36 # On os2 the warning is on by default...
37 ok( ($^O eq 'os2' xor !(-s $tmpfile)) ,'$Shell::capture_stderr');
39 $Shell::capture_stderr = 0; #
41 # someone will have to fill in the blanks for other platforms
45 ok(directory(),'Execute command');
46 my @files = directory('*.*');
47 ok(@files,'Quoted arguments');
51 ok(dir(),'Execute command');
53 my @files = dir('*.*');
55 ok(@files, 'Quoted arguments');
59 ok(ls(),'Execute command');
63 ok(@files,'Quoted arguments');
66 open(STDERR,">&SAVERR") ;