Commit | Line | Data |
---|---|---|
48c4c863 NC |
1 | #!perl -w |
2 | print "1..5\n"; | |
3 | ||
2d90ac95 | 4 | my $file = "Run_switchF1.pl"; |
48c4c863 NC |
5 | |
6 | open F, ">$file" or die "Open $file: $!"; | |
7 | ||
8 | my $prog = <<'EOT'; | |
9 | #!./perl -anF[~#QQ\\xq'] | |
10 | ||
11 | BEGIN { | |
12 | *ARGV = *DATA; | |
13 | } | |
14 | print "@F"; | |
15 | ||
16 | __DATA__ | |
17 | okx1 | |
18 | okq2 | |
19 | ok\3 | |
20 | ok'4 | |
21 | EOT | |
22 | ||
23 | # 2 of the characters toke.c used to use to quote the split parameter: | |
24 | $prog =~ s/QQ/\x01\x80/; | |
25 | # These 2 plus ~ # and ' were enough to make perl choke | |
26 | print F $prog; | |
27 | close F or die "Close $file: $!"; | |
28 | ||
29 | print system ($^X, $file) ? "not ok 5\n" : "ok 5\n"; | |
30 | ||
31 | unlink $file or die "Unlink $file: $!"; |