summaryrefslogtreecommitdiff
path: root/t/pragma
diff options
context:
space:
mode:
authorAndreas Koenig <a.koenig@mind.de>1997-04-23 10:47:00 +0200
committerChip Salzenberg <chip@atlantic.net>1997-04-23 00:00:00 +1200
commitc1b0f331869f7723157d603165e544a78c1a6206 (patch)
tree30e10c0a49039cf61ba46883cf8bb5f5f1311a7e /t/pragma
parent2ea6c7ce0488e1089687862028446bf8024c6a88 (diff)
downloadperl-c1b0f331869f7723157d603165e544a78c1a6206.tar.gz
Don't put leading newline on numeric strings
Subject: NeXT fails one test due to atoi pragme/constants has a test that does the equivalent of: print " \t\n1234" == 1234 ? "ok" : "not ok"; This test prints "not ok" on the NeXT. Here's some background how the NeXT behaves with several leading whitespaces. koenig@franz:/M/extra/sources/perl/perl5.003_97% perl -le ' print " \t\n1234" == 1234 ? "ok" : "not ok"; print " 1234" == 1234 ? "ok" : "not ok"; print "\t1234" == 1234 ? "ok" : "not ok"; print "\n1234" == 1234 ? "ok" : "not ok"; ' not ok ok ok not ok I'd recommend the following patch: p5p-msgid: 199704230847.KAA22752@anna.in-berlin.de
Diffstat (limited to 't/pragma')
-rwxr-xr-xt/pragma/constant.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/pragma/constant.t b/t/pragma/constant.t
index fdd08b85eb..0095f3b627 100755
--- a/t/pragma/constant.t
+++ b/t/pragma/constant.t
@@ -104,9 +104,9 @@ use constant TRAILING => '12 cats';
}
test 25, TRAILING eq '12 cats';
-use constant LEADING => " \t\n1234";
+use constant LEADING => " \t1234";
test 26, LEADING == 1234;
-test 27, LEADING eq " \t\n1234";
+test 27, LEADING eq " \t1234";
use constant ZERO1 => 0;
use constant ZERO2 => 0.0;