bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: executable wrapper on mingw mangles arguments


From: Ralf Wildenhues
Subject: Re: executable wrapper on mingw mangles arguments
Date: Wed, 1 Oct 2008 21:55:48 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Bruno,

Thanks for the feedback, and the test output.  It shows that nothing is
skipped there for your system.

* Bruno Haible wrote on Mon, Sep 29, 2008 at 10:09:23PM CEST:
> > If not, then tests/execute-mode.at should be amended to expose this.
> 
> Yes, I agree. That's why I gave a reference to a complete test case in the
> report. - You are familiar with the syntax of *.at files. I am not.

Certainly.  I didn't mean to say you should do this, merely taking a
note; although the syntax really isn't all that hard; see below.

> In the report I only gave a simple test case with arguments with spaces:
> 
>    abc 'def ghi' jkl
> 
> Feel free to add more examples with double-quotes, backslashes etc:
[...]
> The prepare_spawn function has been tested to cover all these cases.

Thanks for these examples.  Can you try the diff below to see whether it
exposes the failures for you, and whether, with your patch also applied,
fixes its failure?  Testing should still work with
  make check-local TESTSUITEFLAGS='-v -d -x -k "execute mode"'

Thanks,
Ralf

diff --git a/tests/execute-mode.at b/tests/execute-mode.at
index 349c829..1e97dee 100644
--- a/tests/execute-mode.at
+++ b/tests/execute-mode.at
@@ -25,6 +25,8 @@
 AT_SETUP([execute mode])
 AT_KEYWORDS([libtool])
 
+eval `$LIBTOOL --config | $EGREP '^(FGREP)='`
+
 AT_DATA([foo],
 [[#! /bin/sh
 if test $# -gt 0; then
@@ -119,4 +121,25 @@ AT_CHECK([$LIBTOOL --mode=execute ./foo lt-wrapper "arg  
with special chars: \$!
         [], [./lt-real arg  with special chars: $!&*`'()
 ])
 
+for arg in \
+   'def ghi' \
+   'd"e' 'f"g' \
+   'd\"e' 'f\"g' \
+   'd\\"e' 'f\\"g' \
+   'd\\\"e' 'f\\\"g' \
+   'd\' \
+   'd\\' \
+   'd\\\' \
+   'd\\\\' \
+   '<' '>' \
+   '<def>'
+do
+  AT_CHECK([$LIBTOOL --mode=execute ./foo " $arg"], [], [stdout])
+  AT_CHECK([$FGREP " $arg" stdout], [], [ignore])
+  AT_CHECK([$LIBTOOL --mode=execute ./lt-wrapper " $arg" </dev/null], [], 
[stdout])
+  AT_CHECK([$FGREP " $arg" stdout], [], [ignore])
+  AT_CHECK([$LIBTOOL --mode=execute ./foo lt-wrapper " $arg"], [], [stdout])
+  AT_CHECK([$FGREP " $arg" stdout], [], [ignore])
+done
+
 AT_CLEANUP




reply via email to

[Prev in Thread] Current Thread [Next in Thread]