Permalink
Browse files

Handle quoted arguments correctly in wrapper script. Fixes #28

  • Loading branch information...
ihh committed Dec 16, 2016
1 parent 4d4d083 commit 4aa33ca407e71c17835ae46fa3fae45772d2e19b
Showing with 17 additions and 1 deletion.
  1. +1 −1 bin/swipl_wrap
  2. +1 −0 prolog/test/test.pl
  3. +6 −0 t/ref/walk.right.through.the.door
  4. +7 −0 t/sge/fake_qdel
  5. +2 −0 t/sge/fake_qsub
View
@@ -16,4 +16,4 @@ if [ -z `which swipl` ]; then
fi
fi
$SWIPL $@
$SWIPL "$@"
View
@@ -212,6 +212,7 @@
run_test("-f Makefile.queue -Q poolq -H","the.head.on.the.door"),
run_test("ref","target",[],["sleep 2"],"-d -f Makefile.queue -Q sge --qsub-exec ../sge/fake_qsub --qdel-exec ../sge/fake_qdel","outside.theres.a.boxcar.waiting"),
run_test("ref","target",[],["sleep 2"],"-d -f Makefile.queue -Q sge -H --qsub-exec ../sge/fake_qsub --qdel-exec ../sge/fake_qdel","that.was.my.favourite.dress"),
run_test("ref","target",[],["sleep 2"],"-d -f Makefile.queue -Q sge --qsub-exec ../sge/fake_qsub --qdel-exec ../sge/fake_qdel --queue-args '--fake-arg dummy'","walk.right.through.the.door"),
announce("COMMAND-LINE OPTIONS"),
@@ -0,0 +1,6 @@
Baz!
C= THROUGH B= RIGHT A= WALK
I said Baz!
Bo!
B= DOOR A= THE
Did you hear me say Bo!
View
@@ -1,3 +1,10 @@
#!/usr/bin/env perl
while (@ARGV && $ARGV[0] =~ /^-/) {
my $arg = shift;
if ($arg eq '--fake-arg') {
shift;
}
}
system "kill @ARGV";
View
@@ -14,6 +14,8 @@ while (@ARGV && $ARGV[0] =~ /^-/) {
last unless grep($_ eq $hold,@pids);
}
}
} elsif ($arg eq '--fake-arg') {
shift;
}
}

0 comments on commit 4aa33ca

Please sign in to comment.