> Le 20 janv. 2020 à 23:29, Adrian Vogelsgesang <avogelsges...@tableau.com> a 
> écrit :
> 
> Hi Nikki,
> 
> My first guess would be: could it be that you are executing the test cases 
> from a directory with a space somewhere its path?
> "/cygdrive/d/Nikki/Doc/STTS/Asdos/04" looks like a path prefix to me.

Yes, same bet on my side.

I can easily address some of the problems (those in examples/), but I
don't know yet what's the best way to address there will be with the
main test suite (not all the tests, just some of them).

Nikki, first rest assured that Bison works fine, the problem is only
with the test suite.  If you want to see things improve a bit, install
the attached 'test' in the examples/ directory, and check again.  I'm
installing the following commit in maint and master.

Attachment: test
Description: Binary data



commit 1587a5ea9b9a0e3b23c234ab090ad01bc149c20a
Author: Akim Demaille <akim.demai...@gmail.com>
Date:   Tue Jan 21 06:53:43 2020 +0100

    examples: be more robust to spaces in paths
    
    Reported by Nikki Valen.
    https://lists.gnu.org/r/bug-bison/2020-01/msg00032.html
    
    * examples/test ($prog): Remove, replaced by...
    (prog): This new function, which pays attention to quoting shell
    variables.

diff --git a/THANKS b/THANKS
index 46de4dc2..db54776a 100644
--- a/THANKS
+++ b/THANKS
@@ -130,6 +130,7 @@ Nick Bowler               nbow...@elliptictech.com
 Nicolas Bedon             nicolas.be...@univ-rouen.fr
 Nicolas Burrus            nicolas.bur...@epita.fr
 Nicolas Tisserand         nicolas.tisser...@epita.fr
+Nikki Valen               nicolettavalencia...@gmail.com
 Noah Friedman             fried...@gnu.org
 Odd Arild Olsen           o...@fibula.no
 Oleg Smolsky              oleg.smol...@pacific-simulators.co.nz
diff --git a/examples/test b/examples/test
index 79b8c994..75f4c58d 100755
--- a/examples/test
+++ b/examples/test
@@ -31,18 +31,18 @@ exit=true
 cwd=$(pwd)
 
 # The exercised program.
-for p in "$cwd/examples/$medir/$me"
-do
-    if test -x "$p"; then
-        prog=$p
-        break
-    elif test -f "$p.class"; then
-        pwd
-        prog="$SHELL $cwd/javaexec.sh -cp $(dirname $p) $(basename $p)"
-        break
-    fi
-done
-if test x"$prog" = x; then
+abs_medir=$cwd/examples/$medir
+if test -x "$abs_medir/$me"; then
+    prog ()
+    {
+        "$abs_medir/$me" "$@"
+    }
+elif test -f "$abs_medir/$me.class"; then
+    prog ()
+    {
+        "$SHELL" "$cwd/javaexec.sh" -cp "$abs_medir" "$me" "$@"
+    }
+else
     echo "$me: ERROR: cannot find program to exercise in:"
     echo "$me: ERROR:   $cwd/examples/$medir/$me"
     exit 1
@@ -55,7 +55,7 @@ cleanup ()
 {
   status=$?
   if test -z "$DEBUG"; then
-     cd $cwd
+     cd "$cwd"
      rm -rf $$.dir
   fi
   exit $status
@@ -82,7 +82,7 @@ run ()
   shift
   # Effective exit status.
   sta_eff=0
-  $prog "$@" - <input >out_eff 2>err_eff || sta_eff=$?
+  prog "$@" - <input >out_eff 2>err_eff || sta_eff=$?
   # Combine effective output and error streams.
   out_eff=$(cat out_eff && $noerr || sed -e 's/^/err: /g' err_eff)
   if test $sta_eff -eq $sta_exp; then

Reply via email to