projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e67cea9
)
fix write test: -small_number may be displayed as 00.00 or -0.00
author
Dave Mitchell
<davem@fdisolutions.com>
Wed, 18 Feb 2004 13:22:13 +0000
(13:22 +0000)
committer
Dave Mitchell
<davem@fdisolutions.com>
Wed, 18 Feb 2004 13:22:13 +0000
(13:22 +0000)
p4raw-id: //depot/perl@22337
t/op/write.t
patch
|
blob
|
history
diff --git
a/t/op/write.t
b/t/op/write.t
index
ae9f8a5
..
52ba517
100755
(executable)
--- a/
t/op/write.t
+++ b/
t/op/write.t
@@
-33,7
+33,7
@@
my @NumTests = (
999.99499, '999.99', -100, '######' ],
[ '@0#.##', 0, '000.00', 1, '001.00', 10, '010.00',
- -0.0001,
'-00.00'
],
+ -0.0001,
qr/^[\-0]00\.00$/
],
);
@@
-486,8
+486,11
@@
for my $tref ( @NumTests ){
my $expected = shift @$tref;
my $writeres = swrite( $writefmt, $val );
$nt++;
-
- print $expected eq $writeres
+ my $ok = ref($expected)
+ ? $writeres =~ $expected
+ : $writeres eq $expected;
+
+ print $ok
? "ok $nt\n"
: "not ok $nt\n# f=[$writefmt] exp=[$expected] got=[$writeres]\n";
}