home *** CD-ROM | disk | FTP | other *** search
- print "1..2\n";
- require 'assert.pl';
-
- #
- # NT test of assert.pl
- #
- # N.B. the quotes are strategically placed to avoid problems
- # with cmd.exe. It doesn't grok single quotes, so the outer
- # quotes must be double-quotes to avoid < or > being interpreted
- # as I/O redirection. Grrrr...
- #
-
-
- #
- # check that we get the ASSERTION BOTCHED message
- #
-
- $x = `perl -e "require 'assert.pl'; &assert('1 < 0');" 2>&1`;
- if ($x =~ /BOTCHED/) {print "ok 1\n";} else {print "not ok 1\n";}
-
- #
- # check that this issues no message
- #
-
- $x = `perl -e "require 'assert.pl'; &assert('1 > 0');" 2>&1`;
- if ($x eq '') {print "ok 2\n";} else {print "not ok 2\n";}
-