bug-bash
[Top][All Lists]
Advanced

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

Bash 2.05 "make check" fails if "b" is set


From: Paul Eggert
Subject: Bash 2.05 "make check" fails if "b" is set
Date: Wed, 2 May 2001 00:19:49 -0700 (PDT)

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.7
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' 
-DCONF_OSTYPE='solaris2.7' -DCONF_MACHTYPE='sparc-sun-solaris2.7' 
-DCONF_VENDOR='sun' -DSHELL  -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib 
-I/opt/reb/include -g -O2
uname output: SunOS shade.twinsun.com 5.8 Generic_108528-07 sun4u sparc 
SUNW,Ultra-1
Machine Type: sparc-sun-solaris2.7

Bash Version: 2.05
Patch Level: 0
Release Status: release

Description:
        "make check" reported some discrepancies which boil down to
        the fact that the tests assume that the environment variable
        "b" is not set.

Repeat-By:
        $ cd bash # the Bash source directory
        $ export b=/net/knick/home/eggert/bin
        $ make check
        ...
        run-arith
        145,146c145,146
        < ./arith.tests: /net/knick/home/eggert/bin: syntax error: operand 
expected (error token is "/net/knick/home/eggert/bin")
        < ./arith.tests: ((: /net/knick/home/eggert/bin: syntax error: operand 
expected (error token is "/net/knick/home/eggert/bin")
        ---
        > ./arith.tests: a b: syntax error in expression (error token is "b")
        > ./arith.tests: ((: a b: syntax error in expression (error token is 
"b")
        ...
        run-array
        warning: all of these tests will fail if arrays have not
        warning: been compiled into the shell
        10c10
        < declare -ax b='([0]="/net/knick/home/eggert/bin")'
        ---
        > declare -a b='()'
        34c34
        < declare -ax b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" 
[5]="/etc/passwd")'
        ---
        > declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" 
[5]="/etc/passwd")'
        52c52
        < declare -ax b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" 
[5]="/etc/passwd")'
        ---
        > declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" 
[5]="/etc/passwd")'
        64c64
        < declare -ax b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" 
[5]="/etc/passwd")'
        ---
        > declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" 
[5]="/etc/passwd")'
        run-array2
        ...

Fix:

2001-05-02  Paul Eggert  <address@hidden>

        * tests/arith.tests, tests/array.tests: Don't assume that "b" is unset
        as it might have been set in the environment.

===================================================================
RCS file: tests/array.tests,v
retrieving revision 2.5
retrieving revision 2.5.0.1
diff -pu -r2.5 -r2.5.0.1
--- tests/array.tests   2000/09/26 19:30:59     2.5
+++ tests/array.tests   2001/05/02 07:17:36     2.5.0.1
@@ -20,7 +20,7 @@ echo ${a[0]}
 unset a
 a=abcde
 a[2]=bdef
-
+unset b
 declare -a b[256]
 
 unset c[2]
===================================================================
RCS file: tests/arith.tests,v
retrieving revision 2.5
retrieving revision 2.5.0.1
diff -pu -r2.5 -r2.5.0.1
--- tests/arith.tests   2000/09/25 17:40:45     2.5
+++ tests/arith.tests   2001/05/02 07:17:36     2.5.0.1
@@ -263,8 +263,8 @@ echo $x $y
 
 # should be an error
 (( x=9 y=41 ))
-
 # These are errors
+unset b
 echo $((a b))
 ((a b))
 



reply via email to

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