9 my $cwdb = my $cwd = cwd();
13 my $testdir = "t e s t";
14 my $exename = "showav";
15 my $plxname = "showargv";
17 my $exe = "$testdir/$exename";
18 my $exex = $exe . ".exe";
19 (my $exeb = $exe) =~ s,/,\\,g;
20 my $exebx = $exeb . ".exe";
22 my $bat = "$testdir/$plxname";
23 my $batx = $bat . ".bat";
24 (my $batb = $bat) =~ s,/,\\,g;
25 my $batbx = $batb . ".bat";
27 my $cmdx = $bat . ".cmd";
29 my $cmdbx = $cmdb . ".cmd";
67 [$^X, "$cwdb\\$batbx"],
82 ["", "\ta b c ", "abc"],
83 [" ", "\ta b c ", "abc"],
84 ['" "', 'a" "b" "c', "abc"],
87 print "1.." . (@commands * @av * 2) . "\n";
88 for my $cmds (@commands) {
91 my @cmds = defined($cmds) ? (ref($cmds) ? @$cmds : $cmds) : ();
92 my @args = defined($args) ? (ref($args) ? @$args : $args) : ();
93 print "######## [@cmds]\n";
96 map { my $x = $_; $x =~ s/"//g; $x } @args),
98 if (system(@cmds,@args) != 0) {
99 print "Failed, status($?)\n";
100 if ($Config{ccflags} =~ /\bDDEBUGGING\b/) {
101 print "Running again in debug mode\n";
107 my $cmdstr = join " ", map { /\s|^$/ && !/\"/
108 ? qq["$_"] : $_ } @cmds, @args;
109 print "######## '$cmdstr'\n";
110 if (system($cmdstr) != 0) {
111 print "Failed, status($?)\n";
112 if ($Config{ccflags} =~ /\bDDEBUGGING\b/) {
113 print "Running again in debug mode\n";