Permalink
Browse files

Fix over-quoting of compiler argument strings

Closes #7. Thanks to Stephen Kell.
  • Loading branch information...
1 parent 1781542 commit 878b2a2ea51157ae0e51bdef261d267aa35e2cf7 @kerneis kerneis committed Mar 10, 2014
Showing with 16 additions and 3 deletions.
  1. +0 −3 lib/perl5/App/Cilly.pm.in
  2. +6 −0 test/Makefile
  3. +9 −0 test/small1/shell-escape.c
  4. +1 −0 test/testcil.pl
@@ -1224,9 +1224,6 @@ sub compilerArgument {
&{$action->{'RUN'}}($self, @fullarg, $onemore, $pargs);
$argument_done = 1;
}
- # Quote special SHELL caracters
- @fullarg = map { $_ =~ s%([<>;&|])%'$1'%g; $_ } @fullarg;
- # print "fullarg = ", @fullarg, "\n";
if(defined $action->{'TYPE'}) {
&classifyArgDebug(" type=$action->{TYPE}\n");
if($action->{TYPE} eq 'EARLY_PREPROC') {
View
@@ -152,6 +152,12 @@ ifdef PROFILE
CILLY+= -pg
endif
+ifdef SHELL_ESCAPE
+ INCLUDE_DEF := -DSTDIO=<stdio.h>
+ INCLUDE_DEF2 := -DTEST="testharness.h"
+ CFLAGS += "$(INCLUDE_DEF)" '$(INCLUDE_DEF2)'
+endif
+
# sm: use this instead of "sh ./testit" for those self-tests which can't
# be made to work on windows; it does nothing, and has no output
UNIXTESTIT := sh ./testit
@@ -0,0 +1,9 @@
+/* STDIO is defined with -D="testharness.h" on command line */
+#include TEST
+/* STDIO is defined with -D=<stdio.h> on command line */
+#include STDIO
+
+int main(void)
+{
+ SUCCESS;
+}
View
@@ -714,6 +714,7 @@ sub addToGroup {
addBadComment("testrun/compound1", "Notbug. Undefined behavior (probably).");
addTest("testrun/compound2");
+addTest("test/shell-escape SHELL_ESCAPE=1");
# ---------------- c-torture -------------
## if we have the c-torture tests add them

0 comments on commit 878b2a2

Please sign in to comment.