📄 tests.dif
字号:
diff -cbBwr perl-4.019/t/base/term.t new/t/base/term.t*** perl-4.019/t/base/term.t Wed Mar 20 08:47:14 1991--- new/t/base/term.t Sun Jun 16 20:39:50 1991****************** 29,35 **** # check <> pseudoliteral! open(try, "/dev/null") || (die "Can't open /dev/null."); if (<try> eq '') { print "ok 5\n"; }--- 29,35 ---- # check <> pseudoliteral! open(try, "nul") || (die "Can't open /dev/null."); if (<try> eq '') { print "ok 5\n"; }diff -cbBwr perl-4.019/t/cmd/while.t new/t/cmd/while.t*** perl-4.019/t/cmd/while.t Wed Mar 20 08:46:28 1991--- new/t/cmd/while.t Sun Jun 16 20:52:36 1991****************** 90,96 **** 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`; #$x = 0; #while (1) {--- 90,97 ---- 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";}! close(fh);! `del Cmd.while.tmp`; #$x = 0; #while (1) {diff -cbBwr perl-4.019/t/comp/cpp.t new/t/comp/cpp.t*** perl-4.019/t/comp/cpp.t Wed Mar 20 08:48:44 1991--- new/t/comp/cpp.t Sun Jun 16 20:54:00 1991****************** 32,39 **** print TRY '#define OK "ok 3\n"' . "\n"; close TRY;! $pwd=`pwd`; $pwd =~ s/\n//;! $x = `./perl -P Comp.cpp.tmp`; print $x; unlink "Comp.cpp.tmp", "Comp.cpp.inc";--- 32,39 ---- print TRY '#define OK "ok 3\n"' . "\n"; close TRY;! $pwd=`cd`; $pwd =~ s/\n//;! $x = `perl -P Comp.cpp.tmp`; print $x; unlink "Comp.cpp.tmp", "Comp.cpp.inc";diff -cbBwr perl-4.019/t/comp/script.t new/t/comp/script.t*** perl-4.019/t/comp/script.t Wed Mar 20 08:48:50 1991--- new/t/comp/script.t Sun Jun 16 21:05:02 1991****************** 4,10 **** print "1..3\n";! $x = `./perl -e 'print "ok\n";'`; if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}--- 4,10 ---- print "1..3\n";! $x = `perl -e "print \\\"ok\\n\\\";"`; if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}****************** 12,23 **** print try 'print "ok\n";'; print try "\n"; close try;! $x = `./perl Comp.script`; if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";}! $x = `./perl <Comp.script`; if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";}! `/bin/rm -f Comp.script`;--- 12,23 ---- print try 'print "ok\n";'; print try "\n"; close try;! $x = `perl Comp.script`; if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";}! $x = `perl <Comp.script`; if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";}! `del Comp.script`;diff -cbBwr perl-4.019/t/io/argv.t new/t/io/argv.t*** perl-4.019/t/io/argv.t Wed Mar 20 08:48:38 1991--- new/t/io/argv.t Sun Jun 16 21:14:14 1991****************** 8,26 **** print try "a line\n"; close try;! $x = `./perl -e 'while (<>) {print \$.,\$_;}' Io.argv.tmp Io.argv.tmp`; if ($x eq "1a line\n2a line\n") {print "ok 1\n";} else {print "not ok 1\n";}! $x = `echo foo|./perl -e 'while (<>) {print $_;}' Io.argv.tmp -`; if ($x eq "a line\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}! $x = `echo foo|./perl -e 'while (<>) {print $_;}'`; if ($x eq "foo\n") {print "ok 3\n";} else {print "not ok 3 :$x:\n";}! @ARGV = ('Io.argv.tmp', 'Io.argv.tmp', '/dev/null', 'Io.argv.tmp'); while (<>) { $y .= $. . $_; if (eof()) {--- 8,26 ---- print try "a line\n"; close try;! $x = `perl -e "while (<>) {print \$.,\$_;}" Io.argv.tmp Io.argv.tmp`; if ($x eq "1a line\n2a line\n") {print "ok 1\n";} else {print "not ok 1\n";}! $x = `echo foo | perl -e "while (<>) {print $_;}" Io.argv.tmp -`; if ($x eq "a line\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}! $x = `echo foo | perl -e "while (<>) {print $_;}"`; if ($x eq "foo\n") {print "ok 3\n";} else {print "not ok 3 :$x:\n";}! @ARGV = ('Io.argv.tmp', 'Io.argv.tmp', 'nul', 'Io.argv.tmp'); while (<>) { $y .= $. . $_; if (eof()) {****************** 33,36 **** else {print "not ok 5\n";}! `/bin/rm -f Io.argv.tmp`;--- 33,36 ---- else {print "not ok 5\n";}! `del Io.argv.tmp`;diff -cbBwr perl-4.019/t/io/pipe.t new/t/io/pipe.t*** perl-4.019/t/io/pipe.t Wed Mar 20 08:48:38 1991--- new/t/io/pipe.t Sun Jun 16 21:25:14 1991****************** 5,11 **** $| = 1; print "1..8\n";! open(PIPE, "|-") || (exec 'tr', '[A-Z]', '[a-z]'); print PIPE "OK 1\n"; print PIPE "ok 2\n"; close PIPE;--- 5,11 ---- $| = 1; print "1..8\n";! open(PIPE, "|-") || (exec 'tr.exe', '[A-Z]', '[a-z]'); print PIPE "OK 1\n"; print PIPE "ok 2\n"; close PIPE;****************** 18,24 **** } else { print STDOUT "not ok 3\n";! exec 'echo', 'not ok 4'; } pipe(READER,WRITER) || die "Can't open pipe";--- 18,24 ---- } else { print STDOUT "not ok 3\n";! exec 'perlglob', 'not ok 4'; } pipe(READER,WRITER) || die "Can't open pipe";diff -cbBwr perl-4.019/t/op/exec.t new/t/op/exec.t*** perl-4.019/t/op/exec.t Wed Mar 20 08:48:46 1991--- new/t/op/exec.t Sun Jun 16 21:39:32 1991****************** 7,21 **** print "not ok 1\n" if system "echo ok \\1"; # shell interpreted print "not ok 2\n" if system "echo ok 2"; # split and directly called! print "not ok 3\n" if system "echo", "ok", "3"; # directly called! if (system "true") {print "not ok 4\n";} else {print "ok 4\n";}! if ((system "/bin/sh -c 'exit 1'") != 256) { print "not "; } print "ok 5\n";! if ((system "lskdfj") == 255 << 8) {print "ok 6\n";} else {print "not ok 6\n";} unless (exec "lskdjfalksdjfdjfkls") {print "ok 7\n";} else {print "not ok 7\n";}! exec "echo","ok","8";--- 7,21 ---- print "not ok 1\n" if system "echo ok \\1"; # shell interpreted print "not ok 2\n" if system "echo ok 2"; # split and directly called! print "not ok 3\n" if system "perlglob", "ok", "3", "\n"; # directly called! if (system "expr 1 >nul") {print "not ok 4\n";} else {print "ok 4\n";}! if ((system "sh -c \"exit 1\"") != 1) { print "not "; } print "ok 5\n";! if ((system "lskdfj") == 1) {print "ok 6\n";} else {print "not ok 6\n";} unless (exec "lskdjfalksdjfdjfkls") {print "ok 7\n";} else {print "not ok 7\n";}! exec "perlglob","ok","8";diff -cbBwr perl-4.019/t/op/glob.t new/t/op/glob.t*** perl-4.019/t/op/glob.t Wed Mar 20 08:48:54 1991--- new/t/op/glob.t Sun Jun 16 21:43:26 1991****************** 7,13 **** @ops = <op/*>; $list = join(' ',@ops);! chop($otherway = `echo op/*`); print $list eq $otherway ? "ok 1\n" : "not ok 1\n$list\n$otherway\n";--- 7,13 ---- @ops = <op/*>; $list = join(' ',@ops);! chop($otherway = `perlglob op/*`); print $list eq $otherway ? "ok 1\n" : "not ok 1\n$list\n$otherway\n";diff -cbBwr perl-4.019/t/op/goto.t new/t/op/goto.t*** perl-4.019/t/op/goto.t Wed Mar 20 08:48:46 1991--- new/t/op/goto.t Sun Jun 16 21:50:54 1991****************** 29,34 **** print "#2\t:$foo: == 4\n"; if ($foo == 4) {print "ok 2\n";} else {print "not ok 2\n";}! $x = `./perl -e 'goto foo;' 2>&1`; print "#3\t/label/ in :$x"; if ($x =~ /label/) {print "ok 3\n";} else {print "not ok 3\n";}--- 29,34 ---- print "#2\t:$foo: == 4\n"; if ($foo == 4) {print "ok 2\n";} else {print "not ok 2\n";}! $x = `perl -e "goto foo;" 2>&1`; print "#3\t/label/ in :$x"; if ($x =~ /label/) {print "ok 3\n";} else {print "not ok 3\n";}diff -cbBwr perl-4.019/t/op/magic.t new/t/op/magic.t*** perl-4.019/t/op/magic.t Wed Mar 20 08:48:36 1991--- new/t/op/magic.t Sun Jun 16 21:56:14 1991****************** 7,13 **** print "1..5\n"; eval '$ENV{"foo"} = "hi there";'; # check that ENV is inited inside eval! if (`echo \$foo` eq "hi there\n") {print "ok 1\n";} else {print "not ok 1\n";} unlink 'ajslkdfpqjsjfk'; $! = 0;--- 7,13 ---- print "1..5\n"; eval '$ENV{"foo"} = "hi there";'; # check that ENV is inited inside eval! if (`echo %foo%` eq "hi there\n") {print "ok 1\n";} else {print "not ok 1\n";} unlink 'ajslkdfpqjsjfk';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -