diff options
author | Larry Wall <lwall@netlabs.com> | 1991-03-21 00:00:00 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1991-03-21 00:00:00 +0000 |
commit | fe14fcc35f78a371a174a1d14256c2f35ae4262b (patch) | |
tree | d472cb1055c47b9701cb0840969aacdbdbc9354a /t/base/term.t | |
parent | 27e2fb84680b9cc1db17238d5bf10b97626f477f (diff) | |
download | perl-fe14fcc35f78a371a174a1d14256c2f35ae4262b.tar.gz |
perl 4.0.00: (no release announcement available)perl-4.0.00
So far, 4.0 is still a beta test version. For the last production
version, look in pub/perl.3.0/kits@44.
Diffstat (limited to 't/base/term.t')
-rw-r--r-- | t/base/term.t | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/t/base/term.t b/t/base/term.t new file mode 100644 index 0000000000..c322242710 --- /dev/null +++ b/t/base/term.t @@ -0,0 +1,42 @@ +#!./perl + +# $Header: term.t,v 4.0 91/03/20 01:49:17 lwall Locked $ + +print "1..6\n"; + +# check "" interpretation + +$x = "\n"; +if ($x lt ' ') {print "ok 1\n";} else {print "not ok 1\n";} + +# check `` processing + +$x = `echo hi there`; +if ($x eq "hi there\n") {print "ok 2\n";} else {print "not ok 2\n";} + +# check $#array + +$x[0] = 'foo'; +$x[1] = 'foo'; +$tmp = $#x; +print "#3\t:$tmp: == :1:\n"; +if ($#x == '1') {print "ok 3\n";} else {print "not ok 3\n";} + +# check numeric literal + +$x = 1; +if ($x == '1') {print "ok 4\n";} else {print "not ok 4\n";} + +# check <> pseudoliteral + +open(try, "/dev/null") || (die "Can't open /dev/null."); +if (<try> eq '') { + print "ok 5\n"; +} +else { + print "not ok 5\n"; + die "/dev/null IS NOT A CHARACTER SPECIAL FILE!!!!\n" unless -c '/dev/null'; +} + +open(try, "../Makefile") || (die "Can't open ../Makefile."); +if (<try> ne '') {print "ok 6\n";} else {print "not ok 6\n";} |