summaryrefslogtreecommitdiff
path: root/t/cmd
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1994-10-17 23:00:00 +0000
committerLarry Wall <lwall@netlabs.com>1994-10-17 23:00:00 +0000
commita0d0e21ea6ea90a22318550944fe6cb09ae10cda (patch)
treefaca1018149b736b1142f487e44d1ff2de5cc1fa /t/cmd
parent85e6fe838fb25b257a1b363debf8691c0992ef71 (diff)
downloadperl-a0d0e21ea6ea90a22318550944fe6cb09ae10cda.tar.gz
perl 5.000perl-5.000
[editor's note: this commit combines approximate 4 months of furious releases of Andy Dougherty and Larry Wall - see pod/perlhist.pod for details. Andy notes that; Alas neither my "Irwin AccuTrack" nor my DC 600A quarter-inch cartridge backup tapes from that era seem to be readable anymore. I guess 13 years exceeds the shelf life for that backup technology :-(. ]
Diffstat (limited to 't/cmd')
-rwxr-xr-xt/cmd/elsif.t8
-rwxr-xr-xt/cmd/while.t16
2 files changed, 12 insertions, 12 deletions
diff --git a/t/cmd/elsif.t b/t/cmd/elsif.t
index e42fa61137..7eace161e0 100755
--- a/t/cmd/elsif.t
+++ b/t/cmd/elsif.t
@@ -19,7 +19,7 @@ sub foo {
print "1..4\n";
-if (($x = do foo(1)) == 1) {print "ok 1\n";} else {print "not ok 1 '$x'\n";}
-if (($x = do foo(2)) == 2) {print "ok 2\n";} else {print "not ok 2 '$x'\n";}
-if (($x = do foo(3)) == 3) {print "ok 3\n";} else {print "not ok 3 '$x'\n";}
-if (($x = do foo(4)) == 4) {print "ok 4\n";} else {print "not ok 4 '$x'\n";}
+if (($x = &foo(1)) == 1) {print "ok 1\n";} else {print "not ok 1 '$x'\n";}
+if (($x = &foo(2)) == 2) {print "ok 2\n";} else {print "not ok 2 '$x'\n";}
+if (($x = &foo(3)) == 3) {print "ok 3\n";} else {print "not ok 3 '$x'\n";}
+if (($x = &foo(4)) == 4) {print "ok 4\n";} else {print "not ok 4 '$x'\n";}
diff --git a/t/cmd/while.t b/t/cmd/while.t
index f42174eeca..4c8c10e990 100755
--- a/t/cmd/while.t
+++ b/t/cmd/while.t
@@ -4,7 +4,7 @@
print "1..10\n";
-open (tmp,'>Cmd.while.tmp') || die "Can't create Cmd.while.tmp.";
+open (tmp,'>Cmd_while.tmp') || die "Can't create Cmd_while.tmp.";
print tmp "tvi925\n";
print tmp "tvi920\n";
print tmp "vt100\n";
@@ -14,7 +14,7 @@ close tmp;
# test "last" command
-open(fh,'Cmd.while.tmp') || die "Can't open Cmd.while.tmp.";
+open(fh,'Cmd_while.tmp') || die "Can't open Cmd_while.tmp.";
while (<fh>) {
last if /vt100/;
}
@@ -23,7 +23,7 @@ if (!eof && /vt100/) {print "ok 1\n";} else {print "not ok 1 $_\n";}
# test "next" command
$bad = '';
-open(fh,'Cmd.while.tmp') || die "Can't open Cmd.while.tmp.";
+open(fh,'Cmd_while.tmp') || die "Can't open Cmd_while.tmp.";
while (<fh>) {
next if /vt100/;
$bad = 1 if /vt100/;
@@ -33,7 +33,7 @@ if (!eof || /vt100/ || $bad) {print "not ok 2\n";} else {print "ok 2\n";}
# test "redo" command
$bad = '';
-open(fh,'Cmd.while.tmp') || die "Can't open Cmd.while.tmp.";
+open(fh,'Cmd_while.tmp') || die "Can't open Cmd_while.tmp.";
while (<fh>) {
if (s/vt100/VT100/g) {
s/VT100/Vt100/g;
@@ -49,7 +49,7 @@ if (!eof || $bad) {print "not ok 3\n";} else {print "ok 3\n";}
# test "last" command
$badcont = '';
-open(fh,'Cmd.while.tmp') || die "Can't open Cmd.while.tmp.";
+open(fh,'Cmd_while.tmp') || die "Can't open Cmd_while.tmp.";
line: while (<fh>) {
if (/vt100/) {last line;}
} continue {
@@ -62,7 +62,7 @@ if (!$badcont) {print "ok 5\n";} else {print "not ok 5\n";}
$bad = '';
$badcont = 1;
-open(fh,'Cmd.while.tmp') || die "Can't open Cmd.while.tmp.";
+open(fh,'Cmd_while.tmp') || die "Can't open Cmd_while.tmp.";
entry: while (<fh>) {
next entry if /vt100/;
$bad = 1 if /vt100/;
@@ -76,7 +76,7 @@ if (!$badcont) {print "ok 7\n";} else {print "not ok 7\n";}
$bad = '';
$badcont = '';
-open(fh,'Cmd.while.tmp') || die "Can't open Cmd.while.tmp.";
+open(fh,'Cmd_while.tmp') || die "Can't open Cmd_while.tmp.";
loop: while (<fh>) {
if (s/vt100/VT100/g) {
s/VT100/Vt100/g;
@@ -90,7 +90,7 @@ loop: while (<fh>) {
if (!eof || $bad) {print "not ok 8\n";} else {print "ok 8\n";}
if (!$badcont) {print "ok 9\n";} else {print "not ok 9\n";}
-`/bin/rm -f Cmd.while.tmp`;
+unlink 'Cmd_while.tmp' || `/bin/rm Cmd_While.tmp`;
#$x = 0;
#while (1) {