This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix deparsing of subs named :::: and ::::::
[perl5.git] / dist / B-Deparse / t / deparse.t
index 5ea240a..4948773 100644 (file)
@@ -170,6 +170,18 @@ eval <<EOFCODE and test($x);
    1
 EOFCODE
 
+# Exotic sub declarations
+$a = `$^X $path "-MO=Deparse" -e "sub ::::{}sub ::::::{}" 2>&1`;
+$a =~ s/-e syntax OK\n//g;
+is($a, <<'EOCODG', "sub :::: and sub ::::::");
+sub :::: {
+    
+}
+sub :::::: {
+    
+}
+EOCODG
+
 # [perl #33752]
 {
   my $code = <<"EOCODE";