Commit | Line | Data |
---|---|---|
48c4c863 | 1 | #!perl -w |
06fdbb00 JK |
2 | |
3 | # This test file does not use test.pl because of the involved way in which it | |
4 | # generates its TAP output. | |
5 | ||
48c4c863 NC |
6 | print "1..5\n"; |
7 | ||
2d90ac95 | 8 | my $file = "Run_switchF1.pl"; |
48c4c863 NC |
9 | |
10 | open F, ">$file" or die "Open $file: $!"; | |
11 | ||
12 | my $prog = <<'EOT'; | |
13 | #!./perl -anF[~#QQ\\xq'] | |
14 | ||
15 | BEGIN { | |
16 | *ARGV = *DATA; | |
17 | } | |
18 | print "@F"; | |
19 | ||
20 | __DATA__ | |
c3857f22 JK |
21 | okx1x- use of alternate delimiter (lower case letter) in -F |
22 | okq2q- use of alternate delimiter (lower case letter) in -F | |
23 | ok\3\- use of alternate delimiter (backslash) in -F | |
24 | ok'4'- use of alternate delimiter (apostrophe) in -F | |
48c4c863 NC |
25 | EOT |
26 | ||
27 | # 2 of the characters toke.c used to use to quote the split parameter: | |
28 | $prog =~ s/QQ/\x01\x80/; | |
29 | # These 2 plus ~ # and ' were enough to make perl choke | |
30 | print F $prog; | |
31 | close F or die "Close $file: $!"; | |
32 | ||
c3857f22 JK |
33 | $count = 5; |
34 | $result = "ok $count - complete test of alternate delimiters in -F\n"; | |
35 | print system ($^X, $file) ? "not $result" : $result; | |
48c4c863 NC |
36 | |
37 | unlink $file or die "Unlink $file: $!"; |