summaryrefslogtreecommitdiff
path: root/dist/Devel-PPPort/t/mess.t
diff options
context:
space:
mode:
Diffstat (limited to 'dist/Devel-PPPort/t/mess.t')
-rw-r--r--dist/Devel-PPPort/t/mess.t82
1 files changed, 41 insertions, 41 deletions
diff --git a/dist/Devel-PPPort/t/mess.t b/dist/Devel-PPPort/t/mess.t
index 9a9822ade0..468a9be329 100644
--- a/dist/Devel-PPPort/t/mess.t
+++ b/dist/Devel-PPPort/t/mess.t
@@ -67,8 +67,8 @@ ok $die, "\xE1\n";
undef $die;
ok !defined eval { Devel::PPPort::croak_sv(10) };
-ok $@ =~ /^10 at $0 line /;
-ok $die =~ /^10 at $0 line /;
+ok $@ =~ /^10 at \Q$0\E line /;
+ok $die =~ /^10 at \Q$0\E line /;
undef $die;
$@ = 'should not be visible (1)';
@@ -76,8 +76,8 @@ ok !defined eval {
$@ = 'should not be visible (2)';
Devel::PPPort::croak_sv('');
};
-ok $@ =~ /^ at $0 line /;
-ok $die =~ /^ at $0 line /;
+ok $@ =~ /^ at \Q$0\E line /;
+ok $die =~ /^ at \Q$0\E line /;
undef $die;
$@ = 'should not be visible';
@@ -85,8 +85,8 @@ ok !defined eval {
$@ = 'this must be visible';
Devel::PPPort::croak_sv($@)
};
-ok $@ =~ /^this must be visible at $0 line /;
-ok $die =~ /^this must be visible at $0 line /;
+ok $@ =~ /^this must be visible at \Q$0\E line /;
+ok $die =~ /^this must be visible at \Q$0\E line /;
undef $die;
$@ = 'should not be visible';
@@ -99,18 +99,18 @@ ok $die, "this must be visible\n";
undef $die;
ok !defined eval { Devel::PPPort::croak_sv('') };
-ok $@ =~ /^ at $0 line /;
-ok $die =~ /^ at $0 line /;
+ok $@ =~ /^ at \Q$0\E line /;
+ok $die =~ /^ at \Q$0\E line /;
undef $die;
ok !defined eval { Devel::PPPort::croak_sv("\xE1") };
-ok $@ =~ /^\xE1 at $0 line /;
-ok $die =~ /^\xE1 at $0 line /;
+ok $@ =~ /^\xE1 at \Q$0\E line /;
+ok $die =~ /^\xE1 at \Q$0\E line /;
undef $die;
ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1") };
-ok $@ =~ /^\xC3\xA1 at $0 line /;
-ok $die =~ /^\xC3\xA1 at $0 line /;
+ok $@ =~ /^\xC3\xA1 at \Q$0\E line /;
+ok $die =~ /^\xC3\xA1 at \Q$0\E line /;
undef $warn;
Devel::PPPort::warn_sv("\xE1\n");
@@ -118,34 +118,34 @@ ok $warn, "\xE1\n";
undef $warn;
Devel::PPPort::warn_sv(10);
-ok $warn =~ /^10 at $0 line /;
+ok $warn =~ /^10 at \Q$0\E line /;
undef $warn;
Devel::PPPort::warn_sv('');
-ok $warn =~ /^ at $0 line /;
+ok $warn =~ /^ at \Q$0\E line /;
undef $warn;
Devel::PPPort::warn_sv("\xE1");
-ok $warn =~ /^\xE1 at $0 line /;
+ok $warn =~ /^\xE1 at \Q$0\E line /;
undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1");
-ok $warn =~ /^\xC3\xA1 at $0 line /;
+ok $warn =~ /^\xC3\xA1 at \Q$0\E line /;
ok Devel::PPPort::mess_sv("\xE1\n", 0), "\xE1\n";
ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1\n"}, 1), "\xE1\n";
-ok Devel::PPPort::mess_sv(10, 0) =~ /^10 at $0 line /;
-ok Devel::PPPort::mess_sv(do {my $tmp = 10}, 1) =~ /^10 at $0 line /;
+ok Devel::PPPort::mess_sv(10, 0) =~ /^10 at \Q$0\E line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = 10}, 1) =~ /^10 at \Q$0\E line /;
-ok Devel::PPPort::mess_sv('', 0) =~ /^ at $0 line /;
-ok Devel::PPPort::mess_sv(do {my $tmp = ''}, 1) =~ /^ at $0 line /;
+ok Devel::PPPort::mess_sv('', 0) =~ /^ at \Q$0\E line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = ''}, 1) =~ /^ at \Q$0\E line /;
-ok Devel::PPPort::mess_sv("\xE1", 0) =~ /^\xE1 at $0 line /;
-ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1"}, 1) =~ /^\xE1 at $0 line /;
+ok Devel::PPPort::mess_sv("\xE1", 0) =~ /^\xE1 at \Q$0\E line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1"}, 1) =~ /^\xE1 at \Q$0\E line /;
-ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ /^\xC3\xA1 at $0 line /;
-ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ /^\xC3\xA1 at $0 line /;
+ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ /^\xC3\xA1 at \Q$0\E line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ /^\xC3\xA1 at \Q$0\E line /;
if ($] ge '5.006') {
BEGIN { if ($] ge '5.006' && $] lt '5.008') { require utf8; utf8->import(); } }
@@ -161,9 +161,9 @@ if ($] ge '5.006') {
undef $die;
ok !defined eval { Devel::PPPort::croak_sv("\x{100}") };
- ok $@ =~ /^\x{100} at $0 line /;
+ ok $@ =~ /^\x{100} at \Q$0\E line /;
if ($] ne '5.008') {
- ok $die =~ /^\x{100} at $0 line /;
+ ok $die =~ /^\x{100} at \Q$0\E line /;
} else {
skip 'skip: broken utf8 support in die hook', 0;
}
@@ -175,7 +175,7 @@ if ($] ge '5.006') {
undef $warn;
Devel::PPPort::warn_sv("\x{100}");
- ok (my $tmp = $warn) =~ /^\x{100} at $0 line /;
+ ok (my $tmp = $warn) =~ /^\x{100} at \Q$0\E line /;
} else {
skip 'skip: broken utf8 support in warn hook', 0 for 1..2;
}
@@ -183,8 +183,8 @@ if ($] ge '5.006') {
ok Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}\n"}, 1), "\x{100}\n";
- ok Devel::PPPort::mess_sv("\x{100}", 0) =~ /^\x{100} at $0 line /;
- ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}"}, 1) =~ /^\x{100} at $0 line /;
+ ok Devel::PPPort::mess_sv("\x{100}", 0) =~ /^\x{100} at \Q$0\E line /;
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}"}, 1) =~ /^\x{100} at \Q$0\E line /;
} else {
skip 'skip: no utf8 support', 0 for 1..12;
}
@@ -199,8 +199,8 @@ if (ord('A') != 65) {
undef $die;
ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}"') };
- ok $@ =~ /^\xE1 at $0 line /;
- ok $die =~ /^\xE1 at $0 line /;
+ ok $@ =~ /^\xE1 at \Q$0\E line /;
+ ok $die =~ /^\xE1 at \Q$0\E line /;
{
undef $die;
@@ -212,7 +212,7 @@ if (ord('A') != 65) {
{
undef $die;
- my $expect = eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+ my $expect = eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1") };
ok $@ =~ $expect;
ok $die =~ $expect;
@@ -224,7 +224,7 @@ if (ord('A') != 65) {
undef $warn;
Devel::PPPort::warn_sv(eval '"\N{U+E1}"');
- ok $warn =~ /^\xE1 at $0 line /;
+ ok $warn =~ /^\xE1 at \Q$0\E line /;
undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1\n");
@@ -232,19 +232,19 @@ if (ord('A') != 65) {
undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1");
- ok $warn =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+ ok $warn =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
ok Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}\n"'}, 1), eval '"\N{U+E1}\n"';
- ok Devel::PPPort::mess_sv(eval('"\N{U+E1}"'), 0) =~ eval 'qr/^\N{U+E1} at $0 line /';
- ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}"'}, 1) =~ eval 'qr/^\N{U+E1} at $0 line /';
+ ok Devel::PPPort::mess_sv(eval('"\N{U+E1}"'), 0) =~ eval 'qr/^\N{U+E1} at \Q$0\E line /';
+ ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}"'}, 1) =~ eval 'qr/^\N{U+E1} at \Q$0\E line /';
ok Devel::PPPort::mess_sv("\xC3\xA1\n", 0), eval '"\N{U+C3}\N{U+A1}\n"';
ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1\n"}, 1), eval '"\N{U+C3}\N{U+A1}\n"';
- ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
- ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+ ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
} else {
skip 'skip: no support for \N{U+..} syntax', 0 for 1..24;
}
@@ -274,11 +274,11 @@ if ($] ge '5.007003' or ($] ge '5.006001' and $] lt '5.007')) {
}
ok !defined eval { Devel::PPPort::croak_no_modify() };
-ok $@ =~ /^Modification of a read-only value attempted at $0 line /;
+ok $@ =~ /^Modification of a read-only value attempted at \Q$0\E line /;
ok !defined eval { Devel::PPPort::croak_memory_wrap() };
-ok $@ =~ /^panic: memory wrap at $0 line /;
+ok $@ =~ /^panic: memory wrap at \Q$0\E line /;
ok !defined eval { Devel::PPPort::croak_xs_usage("params") };
-ok $@ =~ /^Usage: Devel::PPPort::croak_xs_usage\(params\) at $0 line /;
+ok $@ =~ /^Usage: Devel::PPPort::croak_xs_usage\(params\) at \Q$0\E line /;