diff options
author | Molnar Laszlo <molnarl@cdata.tvnet.hu> | 1997-11-21 11:58:26 +0100 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-12-17 14:10:50 +0000 |
commit | 39e571d41067215a80f26089b260f1418caeb36b (patch) | |
tree | e0bca433f79179f69a7b158d5bcd0759cc98e18c /t/op/magic.t | |
parent | 1f70e1ea8280242937e42514e140f4e467e09404 (diff) | |
download | perl-39e571d41067215a80f26089b260f1418caeb36b.tar.gz |
Major changes to the DOS/djgpp port (including threading):
Subject: Re: dos-djgpp port not in perl 5.004_54
p4raw-id: //depot/perl@373
Diffstat (limited to 't/op/magic.t')
-rwxr-xr-x | t/op/magic.t | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/t/op/magic.t b/t/op/magic.t index e48b71cd68..80361ba0b7 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -21,13 +21,14 @@ sub ok { $Is_MSWin32 = $^O eq 'MSWin32'; $Is_VMS = $^O eq 'VMS'; +$Is_Dos = $^O eq 'dos'; $PERL = ($Is_MSWin32 ? '.\perl' : './perl'); print "1..30\n"; -eval '$ENV{"foo"} = "hi there";'; # check that ENV is inited inside eval -if ($Is_MSWin32) { ok 1, `cmd /x /c set foo` eq "foo=hi there\n"; } -else { ok 1, `echo \$foo` eq "hi there\n"; } +eval '$ENV{"FOO"} = "hi there";'; # check that ENV is inited inside eval +if ($Is_MSWin32) { ok 1, `cmd /x /c set FOO` eq "FOO=hi there\n"; } +else { ok 1, `echo \$FOO` eq "hi there\n"; } unlink 'ajslkdfpqjsjfk'; $! = 0; @@ -35,7 +36,7 @@ open(FOO,'ajslkdfpqjsjfk'); ok 2, $!, $!; close FOO; # just mention it, squelch used-only-once -if ($Is_MSWin32) { +if ($Is_MSWin32 || $Is_Dos) { ok 3,1; ok 4,1; } @@ -148,10 +149,12 @@ EOF ok 21, close(SCRIPT), $!; ok 22, chmod(0755, $script), $!; $_ = `$script`; + s/.exe//i if $Is_Dos; s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl s{is perl}{is $perl}; # for systems where $^X is only a basename ok 23, ($Is_MSWin32 ? uc($_) eq uc($s2) : $_ eq $s2), ":$_:!=:$s2:"; $_ = `$perl $script`; + s/.exe//i if $Is_Dos; ok 24, ($Is_MSWin32 ? uc($_) eq uc($s1) : $_ eq $s1), ":$_:!=:$s1: after `$perl $script`"; ok 25, unlink($script), $!; } @@ -161,7 +164,7 @@ ok 26, $] >= 5.00319, $]; ok 27, $^O; ok 28, $^T > 850000000, $^T; -if ($Is_VMS) { +if ($Is_VMS || $Is_Dos) { ok 29, 1; ok 30, 1; } |