This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8455617
)
Test NUL bytes with B::cstring() and B::perlstring().
author
Nicholas Clark
<nick@ccl4.org>
Sun, 24 Oct 2010 11:49:12 +0000
(13:49 +0200)
committer
Nicholas Clark
<nick@ccl4.org>
Sun, 24 Oct 2010 11:50:07 +0000
(13:50 +0200)
ext/B/t/b.t
patch
|
blob
|
blame
|
history
diff --git
a/ext/B/t/b.t
b/ext/B/t/b.t
index
7691e97
..
a9fdbd6
100644
(file)
--- a/
ext/B/t/b.t
+++ b/
ext/B/t/b.t
@@
-162,7
+162,8
@@
like(B::hash("wibble"), qr/0x[0-9a-f]*/, "Testing B::hash()");
is(B::perlstring(undef), '0', "Testing B::perlstring(undef)");
my @common = map {eval $_, $_}
- '"wibble"', '"\""', '"\'"', '"\\\\"', '"\\n\\r\\t\\b\\a\\f"', '"\\177"';
+ '"wibble"', '"\""', '"\'"', '"\\\\"', '"\\n\\r\\t\\b\\a\\f"', '"\\177"',
+ '"\000"', '"\000\000"', '"\000Bing\000"';
my $oct = sprintf "\\%03o", ord '?';
my @tests = (@common, '$_', '"$_"', '@_', '"@_"', '??N', qq{"$oct?N"},