X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fbase%2Fterm.t;h=2d3fe5a5e1e8f7b7b3e76cacc1911e8ae160c264;hb=6cc60dfb2a8776ed38cabadaa23ec442bec7ba81;hp=061cd33b1e714f2a0a6c8a486e96fd339f355f6c;hpb=2eb25c996f78f171b9e185efef03146c255a8fd3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/base/term.t b/t/base/term.t index 061cd33..2d3fe5a 100755 --- a/t/base/term.t +++ b/t/base/term.t @@ -11,14 +11,15 @@ print "1..7\n"; # check "" interpretation $x = "\n"; -# 10 is ASCII/Iso Latin, 21 is EBCDIC. +# 10 is ASCII/Iso Latin, 13 is Mac OS, 21 is EBCDIC. if ($x eq chr(10)) { print "ok 1\n";} +elsif ($x eq chr(13)) { print "ok 1 # Mac OS\n"; } elsif ($x eq chr(21)) { print "ok 1 # EBCDIC\n"; } else {print "not ok 1\n";} # check `` processing -$x = `echo hi there`; +$x = `$^X -le "print 'hi there'"`; if ($x eq "hi there\n") {print "ok 2\n";} else {print "not ok 2\n";} # check $#array @@ -39,7 +40,12 @@ if (($x | 1) == 101) {print "ok 5\n";} else {print "not ok 5\n";} # check <> pseudoliteral -open(try, "/dev/null") || open(try,"nla0:") || (die "Can't open /dev/null."); +if ($^O eq 'MacOS') { + open(try,"Dev:Null") || (die "Can't open /dev/null."); +} else { + open(try, "/dev/null") || open(try,"nla0:") || (die "Can't open /dev/null."); +} + if ( eq '') { print "ok 6\n"; }