develooper Front page | perl.vmsperl | Postings from December 2001

[PATCH t/base/lex.t, term.t] Purging echo from base tests

Thread Next
From:
Michael G Schwern
Date:
December 6, 2001 12:15
Subject:
[PATCH t/base/lex.t, term.t] Purging echo from base tests
Message ID:
20011206201528.GF16414@blackrider
This purges two unportable uses of `echo` from the base tests.

The one in lex I think is really a test to make sure that multiple
here-docs honor their quoting.  `EOS` just happened to be the easiest
way to do it.

If you ever wondered why vms/test.com builds an echo.exe from DCL
commands, assembly code and chewing gum, this is why.


--- t/base/lex.t	2001/12/06 19:44:57	1.1
+++ t/base/lex.t	2001/12/06 19:46:56
@@ -53,8 +53,8 @@
 EOF
 EOE
 
-print <<`EOS` . <<\EOF;
-echo ok 12
+print <<'EOS' . <<\EOF;
+ok 12 - make sure single quotes are honored \nnot ok
 EOS
 ok 13
 EOF
--- t/base/term.t	2001/12/06 19:47:41	1.1
+++ t/base/term.t	2001/12/06 19:48:24
@@ -19,7 +19,7 @@
 
 # check `` processing
 
-$x = `echo hi there`;
+$x = `$^X -le "print 'hi there'"`;
 if ($x eq "hi there\n") {print "ok 2\n";} else {print "not ok 2\n";}
 
 # check $#array


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa@perl.org>	       Kwalitee Is Job One
If you got the wax out of your ears you could hear the twister picking up
the trailer park of your future!

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About