Skip to content

Commit

Permalink
Test patches for OS/2
Browse files Browse the repository at this point in the history
a) Teaches tests in os2/OS2/*/* new format of $Config{extensions};
 os2/OS2/ExtAttr/t/os2_ea.t os2/OS2/PrfDB/t/os2_prfdb.t
 os2/OS2/REXX/t/rx_cmprt.t os2/OS2/REXX/t/rx_dllld.t
 os2/OS2/REXX/t/rx_objcall.t os2/OS2/REXX/t/rx_sql.test
 os2/OS2/REXX/t/rx_tiesql.test os2/OS2/REXX/t/rx_tievar.t
 os2/OS2/REXX/t/rx_tieydb.t os2/OS2/REXX/t/rx_varset.t
 os2/OS2/REXX/t/rx_vrexx.t

b) Closes all the files before unlinking - for DOSISH systems;
 t/cmd/while.t t/comp/multiline.t t/io/argv.t t/lib/anydbm.t
 t/lib/gdbm.t t/lib/ndbm.t t/lib/odbm.t t/lib/sdbm.t

c) t/README mentions running `harness' to get better granularity;
 t/README

d) New test op/lex_assign.t added - will check optimization of lexicals
	when applied - 153 cases (some just ignored since hard to implement).
 MANIFEST t/op/lex_assign.t

e) When a script is started via shell, $Config{exe_ext} may be appended.
 t/op/magic.t

f) path/echo may print a warning if run without args
 t/comp/colon.t 

g) Error explanations more verbose
  t/op/cmp.t t/op/magic.t

p5p-msgid: <199701170448.XAA28948@monk.mps.ohio-state.edu>
  • Loading branch information
Ilya Zakharevich authored and Chip Salzenberg committed Jan 25, 1997
1 parent 7e42bd5 commit bbad360
Show file tree
Hide file tree
Showing 25 changed files with 252 additions and 18 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -657,6 +657,7 @@ t/op/inc.t See if inc/dec of integers near 32 bit limit work
t/op/index.t See if index works
t/op/int.t See if int works
t/op/join.t See if join works
t/op/lex_assign.t See if assignment to lexicals work
t/op/list.t See if array lists work
t/op/local.t See if local works
t/op/magic.t See if magic variables work
Expand Down
4 changes: 2 additions & 2 deletions os2/OS2/ExtAttr/t/os2_ea.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::REXX\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down Expand Up @@ -76,4 +76,4 @@ print "ok 12\n";
}

print "ok 21\n";

unlink 't.out';
5 changes: 4 additions & 1 deletion os2/OS2/PrfDB/t/os2_prfdb.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::PrfDB\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)PrfDB\b/) {
print "1..0\n";
exit 0;
}
Expand Down Expand Up @@ -183,3 +183,6 @@ tie %hash2, 'OS2::PrfDB', $inifile;
print "ok 47\n";

print ($hash2{nnn}->{mmm} eq "67" ? "ok 48\n" : "not ok 48\n# `$val'\n");

untie %hash2;
unlink $inifile;
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_cmprt.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::REXX\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_dllld.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::REXX\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_objcall.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::REXX\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_sql.test
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bOS2::REXX\b/) {
if ($Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_tiesql.test
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bOS2::REXX\b/) {
if ($Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_tievar.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::REXX\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_tieydb.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::REXX\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_varset.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::REXX\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
2 changes: 1 addition & 1 deletion os2/OS2/REXX/t/rx_vrexx.t
Expand Up @@ -2,7 +2,7 @@ BEGIN {
chdir 't' if -d 't/lib';
@INC = '../lib' if -d 'lib';
require Config; import Config;
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2::REXX\b/) {
if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
print "1..0\n";
exit 0;
}
Expand Down
5 changes: 5 additions & 0 deletions t/README
Expand Up @@ -8,4 +8,9 @@ If you put out extra lines with a '#' character on the front, you don't
have to worry about removing the extra print statements later since TEST
ignores lines beginning with '#'.

If you know that "basic" features work and expect that some test are going
to fail, it is adviced to run tests via Test::Harness thusly:
./perl -I../lib harness
This would pinpoint failed tests with better granularity.

If you come up with new tests, send them to larry@wall.org.
1 change: 1 addition & 0 deletions t/cmd/while.t
Expand Up @@ -90,6 +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";}

close(fh) || die "Can't close Cmd_while.tmp.";
unlink 'Cmd_while.tmp' || `/bin/rm Cmd_While.tmp`;

#$x = 0;
Expand Down
2 changes: 1 addition & 1 deletion t/comp/colon.t
Expand Up @@ -110,7 +110,7 @@ ok 18, (not eval "qw:1" and
not eval "qw:echo:ohce: >= 0");

ok 19, (not eval "qx:1" and
eval "qx:echo: eq qx|echo|" and
eval "qx:echo 1: eq qx|echo 1|" and # echo without args may warn
not eval "qx:echo:ohce: >= 0");

ok 20, (not eval "s:1" and
Expand Down
2 changes: 2 additions & 0 deletions t/comp/multiline.t
Expand Up @@ -35,6 +35,8 @@ if ($count == 3) {print "ok 3\n";} else {print "not ok 3\n";}
$_ = `cat Comp.try`;

if (/.*\n.*\n.*\n$/) {print "ok 4\n";} else {print "not ok 4\n";}

close(try) || (die "Can't close temp file.");
unlink 'Comp.try' || `/bin/rm -f Comp.try`;

if ($_ eq $y) {print "ok 5\n";} else {print "not ok 5\n";}
1 change: 1 addition & 0 deletions t/io/argv.t
Expand Up @@ -34,3 +34,4 @@ else
{print "not ok 5\n";}

`/bin/rm -f Io.argv.tmp` if -x '/bin/rm';
unlink 'Io.argv.tmp';
1 change: 1 addition & 0 deletions t/lib/anydbm.t
Expand Up @@ -111,4 +111,5 @@ print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n";
print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");

untie %h;
unlink 'Op.dbmx.dir', $Dfile;
1 change: 1 addition & 0 deletions t/lib/gdbm.t
Expand Up @@ -114,4 +114,5 @@ print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n";
print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");

untie %h;
unlink 'Op.dbmx.dir', $Dfile;
1 change: 1 addition & 0 deletions t/lib/ndbm.t
Expand Up @@ -117,4 +117,5 @@ print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n";
print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");

untie %h;
unlink 'Op.dbmx.dir', $Dfile;
1 change: 1 addition & 0 deletions t/lib/odbm.t
Expand Up @@ -117,4 +117,5 @@ print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n";
print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");

untie %h;
unlink 'Op.dbmx.dir', $Dfile;
1 change: 1 addition & 0 deletions t/lib/sdbm.t
Expand Up @@ -116,4 +116,5 @@ print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n";
print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");

untie %h;
unlink 'Op.dbmx.dir', $Dfile;
4 changes: 2 additions & 2 deletions t/op/cmp.t
Expand Up @@ -18,7 +18,7 @@ for my $i (0..$#FOO) {
print "ok $ok\n";
}
else {
print "not ok $ok ($FOO[$i] <=> $FOO[$j])\n";
print "not ok $ok ($FOO[$i] <=> $FOO[$j]) gives: '$cmp'\n";
}
$ok++;
$cmp = $FOO[$i] cmp $FOO[$j];
Expand All @@ -29,7 +29,7 @@ for my $i (0..$#FOO) {
print "ok $ok\n";
}
else {
print "not ok $ok ($FOO[$i] cmp $FOO[$j])\n";
print "not ok $ok ($FOO[$i] cmp $FOO[$j]) gives '$cmp'\n";
}
}
}

0 comments on commit bbad360

Please sign in to comment.