summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/op/packagev.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/op/packagev.t b/t/op/packagev.t
index bc99ec4524..8e8f19f9b3 100644
--- a/t/op/packagev.t
+++ b/t/op/packagev.t
@@ -17,7 +17,8 @@ my @syntax_cases = (
my @version_cases = <DATA>;
-plan tests => 5 * @syntax_cases + 5 * grep { $_ !~ /^#/ } @version_cases;
+plan tests => 5 * @syntax_cases + 5 * (grep { $_ !~ /^#/ } @version_cases)
+ + 3;
use warnings qw/syntax/;
use version;
@@ -94,6 +95,17 @@ for my $line (@version_cases) {
}
}
+#
+# Tests for #72432 - which reports a syntax error if there's a newline
+# between the package name and the version.
+#
+# Note that we are using 'run_perl' here - there's no problem if
+# "package Foo\n1;" is evalled.
+#
+for my $v ("1", "1.23", "v1.2.3") {
+ ok (run_perl (prog => "package Foo\n$v; print 1;"),
+ "New line between package name and version");
+}
# The data is organized in tab delimited format with these columns:
#