This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure (and Makefile.SH): remove ODBM_File early if c++ (this time even with the...
[perl5.git] / t / base / term.t
index 061cd33..83a32aa 100755 (executable)
@@ -1,7 +1,5 @@
 #!./perl
 
-# $RCSfile: term.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:07 $
-
 BEGIN {
     chdir 't' if -d 't';
 }
@@ -11,14 +9,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 +38,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 (<try> eq '') {
     print "ok 6\n";
 }