summaryrefslogtreecommitdiff
path: root/t/pragma/warn/toke
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-11-17 06:32:39 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-11-17 06:32:39 +0000
commit60e6418e713a685accbfac231ad24b33f7569c3a (patch)
tree20623cdf73bd1bb5fc60ae3ada0b7543696df3cd /t/pragma/warn/toke
parent6f06b55ffd47b279dd1684acb9b556a45e4754a3 (diff)
downloadperl-60e6418e713a685accbfac231ad24b33f7569c3a.tar.gz
fix skipspace() to properly account for newlines in eval''-ed
strings (caused bogus line numbers in diagnostics and debugger) p4raw-id: //depot/perl@2242
Diffstat (limited to 't/pragma/warn/toke')
-rw-r--r--t/pragma/warn/toke12
1 files changed, 9 insertions, 3 deletions
diff --git a/t/pragma/warn/toke b/t/pragma/warn/toke
index 6cc4a500a4..da6c0dc9ae 100644
--- a/t/pragma/warn/toke
+++ b/t/pragma/warn/toke
@@ -290,9 +290,10 @@ Misplaced _ in number at - line 4.
########
# toke.c
use warning 'unsafe' ;
+#line 25 "bar"
$a = FRED:: ;
EXPECT
-Bareword "FRED::" refers to nonexistent package at - line 3.
+Bareword "FRED::" refers to nonexistent package at bar line 25.
########
# toke.c
use warning 'ambiguous' ;
@@ -303,9 +304,14 @@ Ambiguous call resolved as CORE::time(), qualify as such or use & at - line 4.
########
# toke.c
use warning 'utf8' ;
-$_ = " \x{123} " ;
+eval <<'EOE';
+{
+#line 30 "foo"
+ $_ = " \x{123} " ;
+}
+EOE
EXPECT
-Use of \x{} without utf8 declaration at - line 3.
+Use of \x{} without utf8 declaration at foo line 30.
########
# toke.c
use warning 'utf8' ;