diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-01-02 22:49:49 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-01-02 22:49:49 +0000 |
commit | 48c4c8631a1d991929e0c3a63face75159cdfddb (patch) | |
tree | 852a7ae5f0e72eb612df2b80951cf2660fdb9b5a /t | |
parent | 01a19ab0a2917aedc73dc22d27746912f8baa335 (diff) | |
download | perl-48c4c8631a1d991929e0c3a63face75159cdfddb.tar.gz |
Change 23727 broke code that relied on \ being escaped.
Fix this. *Everything* should work now.
p4raw-id: //depot/perl@23730
Diffstat (limited to 't')
-rw-r--r-- | t/run/switchF1.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/run/switchF1.t b/t/run/switchF1.t new file mode 100644 index 0000000000..fc59645646 --- /dev/null +++ b/t/run/switchF1.t @@ -0,0 +1,31 @@ +#!perl -w +print "1..5\n"; + +my $file = "F-Pathological.pl"; + +open F, ">$file" or die "Open $file: $!"; + +my $prog = <<'EOT'; +#!./perl -anF[~#QQ\\xq'] + +BEGIN { + *ARGV = *DATA; +} +print "@F"; + +__DATA__ +okx1 +okq2 +ok\3 +ok'4 +EOT + +# 2 of the characters toke.c used to use to quote the split parameter: +$prog =~ s/QQ/\x01\x80/; +# These 2 plus ~ # and ' were enough to make perl choke +print F $prog; +close F or die "Close $file: $!"; + +print system ($^X, $file) ? "not ok 5\n" : "ok 5\n"; + +unlink $file or die "Unlink $file: $!"; |