Update of /cvsroot/winbash/winbash/tests
In directory usw-pr-cvs1:/tmp/cvs-serv381/tests
Modified Files:
README dollar-at.sh dollar-star.sh dollar.right exp-tests
exp.right getopts.sh glob-test glob.right ifs-test-1.sh
ifs-test-2.sh ifs-test-3.sh ifs.1.right ifs.2.right
ifs.3.right input-line.sh input-line.sub input.right minus-e
minus-e.right new-exp.right new-exp.tests prec.right
precedence run-all run-dollars run-exp-tests run-glob-test
run-ifs-tests run-input-test run-minus-e run-new-exp
run-precedence run-set-e-test run-strip run-varenv set-e-test
set-e.right strip.right strip.tests tilde-tests tilde.right
varenv.right varenv.sh x xx
Log Message:
Fixed more cr/lf problems.
Index: README
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/README,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- README 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ README 9 Mar 2002 04:43:16 -0000 1.2
@@ -1 +1 @@
-Type `sh run-all'.
+Type `sh run-all'.
Index: dollar-at.sh
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/dollar-at.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- dollar-at.sh 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ dollar-at.sh 9 Mar 2002 04:43:16 -0000 1.2
@@ -1 +1 @@
-recho "$@"
+recho "$@"
Index: dollar-star.sh
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/dollar-star.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- dollar-star.sh 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ dollar-star.sh 9 Mar 2002 04:43:16 -0000 1.2
@@ -1 +1 @@
-recho "$*"
+recho "$*"
Index: dollar.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/dollar.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- dollar.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ dollar.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,3 +1,3 @@
-argv[1] = <a b>
-argv[1] = <a>
-argv[2] = <b>
+argv[1] = <a b>
+argv[1] = <a>
+argv[2] = <b>
Index: exp-tests
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/exp-tests,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- exp-tests 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ exp-tests 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,326 +1,326 @@
-#
-# A suite of tests for bash word expansions
-#
-# This tests parameter and variable expansion, with an empahsis on
-# proper quoting behavior.
-#
-# Chet Ramey
-
-#
-# If you comment out the body of this function, you can do a diff against
-# `expansion-tests.right' to see if the shell is behaving correctly
-#
-expect()
-{
- echo expect "$@"
-}
-
-# Test the substitution quoting characters (CTLESC and CTLNUL) in different
-# combinations
-
-expect "<^A>"
-recho `echo ''`
-expect "<^A>"
-recho `echo ""`
-expect "<^B>"
-recho `echo ''`
-expect "<^B>"
-recho `echo ""`
-expect "<^A>"
-recho `echo `
-expect "<^B>"
-recho `echo `
-
-# Test null strings without variable expansion
-expect "<abcdefgh>"
-recho abcd""efgh
-expect "<abcdefgh>"
-recho abcd''efgh
-expect "<abcdefgh>"
-recho ""abcdefgh
-expect "<abcdefgh>"
-recho ''abcdefgh
-expect "<abcd>"
-recho abcd""
-expect "<abcd>"
-recho abcd''
-
-# Test the quirky behavior of $@ in ""
-expect nothing
-recho "$@"
-expect "< >"
-recho " $@"
-expect "<-->"
-recho "-${@}-"
-
-# Test null strings with variable expansion that fails
-expect '<>'
-recho $xxx""
-expect '<>'
-recho ""$xxx
-expect '<>'
-recho $xxx''
-expect '<>'
-recho ''$xxx
-expect '<>'
-recho $xxx""$yyy
-expect '<>'
-recho $xxx''$yyy
-
-# Test null strings with variable expansion that succeeds
-xxx=abc
-yyy=def
-
-expect '<abc>'
-recho $xxx""
-expect '<abc>'
-recho ""$xxx
-expect '<abc>'
-recho $xxx''
-expect '<abc>'
-recho ''$xxx
-expect '<abcdef>'
-recho $xxx""$yyy
-expect '<abcdef>'
-recho $xxx''$yyy
-
-unset xxx yyy
-
-# Test the unquoted special quoting characters
-expect "<^A>"
-recho
-expect "<^B>"
-recho
-expect "<^A>"
-recho ""
-expect "<^B>"
-recho ""
-expect "<^A>"
-recho ''
-expect "<^B>"
-recho ''
-
-# Test expansion of a variable that is unset
-expect nothing
-recho $xxx
-expect '<>'
-recho "$xxx"
-
-expect nothing
-recho "$xxx${@}"
-
-# Test empty string expansion
-expect '<>'
-recho ""
-expect '<>'
-recho ''
-
-# Test command substitution with (disabled) history substitution
-expect '<Hello World!>'
-# set +H
-recho "`echo \"Hello world!\"`"
-
-# Test some shell special characters
-expect '<`>'
-recho "\`"
-expect '<">'
-recho "\""
-expect '<\^A>'
-recho "\"
-
-expect '<\$>'
-recho "\\$"
-
-expect '<\\>'
-recho "\\\\"
-
-# This should give argv[1] = a argv[2] = b
-expect '<a> <b>'
-FOO=`echo 'a b' | tr ' ' '\012'`
-recho $FOO
-
-# This should give argv[1] = ^A argv[2] = ^B
-expect '<^A> <^B>'
-FOO=`echo ' ' | tr ' ' '\012'`
-recho $FOO
-
-# Test quoted and unquoted globbing characters
-expect '<**>'
-recho "*"*
-
-expect '<\.\./*/>'
-recho "\.\./*/"
-
-# Test patterns that come up when the shell quotes funny character
-# combinations
-expect '<^A^B^A^B>'
-recho ''
-expect '<^A^A>'
-recho ''
-expect '<^A^B>'
-recho ''
-expect '<^A^A^B>'
-recho ''
-
-# More tests of "$@"
-expect '< abc> <def> <ghi> <jkl >'
-set abc def ghi jkl
-recho " $@ "
-
-expect '<--abc> <def> <ghi> <jkl-->'
-set abc def ghi jkl
-recho "--$@--"
-
-expect '< >'
-recho " "
-expect '< - >'
-recho " - "
-
-# Test combinations of different types of quoting in a fully-quoted string
-# (so the WHOLLY_QUOTED tests fail and it doesn't get set)
-expect '</^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>'
-recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/"
-
-# Test the various Posix parameter expansions
-
-expect '<foo bar>'
-recho "${x:-$(echo "foo bar")}"
-expect '<foo> <bar>'
-recho ${x:-$(echo "foo bar")}
-
-unset X
-expect '<abc>'
-recho ${X:=abc}
-expect '<abc>'
-recho $X
-
-set a b c
-expect '<posix>'
-recho ${3:+posix}
-
-POSIX=/usr/posix
-expect '<10>'
-recho ${#POSIX}
-
-# remove shortest trailing match
-x=file.c
-expect '<file.o>'
-recho ${x%.c}.o
-
-# remove longest trailing match
-x=posix/src/std
-expect '<posix>'
-recho ${x%%/*}
-
-# remove shortest leading pattern
-x=$HOME/src/cmd
-expect '</src/cmd>'
-recho ${x#$HOME}
-
-# remove longest leading pattern
-x=/one/two/three
-expect '<three>'
-recho ${x##*/}
-
-# Command substitution and the quirky differences between `` and $()
-
-expect '<\$x>'
-recho '\$x'
-
-expect '<$x>'
-recho `echo '\$x'`
-
-expect '<\$x>'
-recho $(echo '\$x')
-
-# The difference between $* "$*" and "$@"
-
-set "abc" "def ghi" "jkl"
-
-expect '<abc> <def> <ghi> <jkl>'
-recho $*
-
-expect '<abc def ghi jkl>'
-recho "$*"
-
-OIFS="$IFS"
-IFS=":$IFS"
-
-# The special behavior of "$*", using the first character of $IFS as separator
-expect '<abc:def ghi:jkl>'
-recho "$*"
-
-IFS="$OIFS"
-
-expect '<abc> <def ghi> <jkl>'
-recho "$@"
-
-expect '<xxabc> <def ghi> <jklyy>'
-recho "xx$@yy"
-
-expect '<abc> <def ghi> <jklabc> <def ghi> <jkl>'
-recho "$@$@"
-
-foo=abc
-bar=def
-
-expect '<abcdef>'
-recho "$foo""$bar"
-
-unset foo
-set $foo bar '' xyz "$foo" abc
-
-expect '<bar> <> <xyz> <> <abc>'
-recho "$@"
-
-# More tests of quoting and deferred evaluation
-
-foo=10 x=foo
-y='$'$x
-expect '<$foo>'
-recho $y
-eval y='$'$x
-expect '<10>'
-recho $y
-
-# case statements
-
-NL='
-'
-x='ab
-cd'
-
-expect '<newline expected>'
-case "$x" in
-*$NL*) recho "newline expected" ;;
-esac
-
-expect '<got it>'
-case \? in
-*"?"*) recho "got it" ;;
-esac
-
-expect '<got it>'
-case \? in
-*\?*) recho "got it" ;;
-esac
-
-set one two three four five
-expect '<one> <three> <five>'
-recho $1 $3 ${5} $8 ${9}
-expect '<5> <5>'
-recho $# ${#}
-
-expect '<42>'
-recho $((28 + 14))
-expect '<26>'
-recho $[ 13 * 2 ]
-
-expect '<\>'
-recho `echo \\\\`
-
-expect '<~>'
-recho '~'
-
-expect nothing
-recho $!
+#
+# A suite of tests for bash word expansions
+#
+# This tests parameter and variable expansion, with an empahsis on
+# proper quoting behavior.
+#
+# Chet Ramey
+
+#
+# If you comment out the body of this function, you can do a diff against
+# `expansion-tests.right' to see if the shell is behaving correctly
+#
+expect()
+{
+ echo expect "$@"
+}
+
+# Test the substitution quoting characters (CTLESC and CTLNUL) in different
+# combinations
+
+expect "<^A>"
+recho `echo ''`
+expect "<^A>"
+recho `echo ""`
+expect "<^B>"
+recho `echo ''`
+expect "<^B>"
+recho `echo ""`
+expect "<^A>"
+recho `echo `
+expect "<^B>"
+recho `echo `
+
+# Test null strings without variable expansion
+expect "<abcdefgh>"
+recho abcd""efgh
+expect "<abcdefgh>"
+recho abcd''efgh
+expect "<abcdefgh>"
+recho ""abcdefgh
+expect "<abcdefgh>"
+recho ''abcdefgh
+expect "<abcd>"
+recho abcd""
+expect "<abcd>"
+recho abcd''
+
+# Test the quirky behavior of $@ in ""
+expect nothing
+recho "$@"
+expect "< >"
+recho " $@"
+expect "<-->"
+recho "-${@}-"
+
+# Test null strings with variable expansion that fails
+expect '<>'
+recho $xxx""
+expect '<>'
+recho ""$xxx
+expect '<>'
+recho $xxx''
+expect '<>'
+recho ''$xxx
+expect '<>'
+recho $xxx""$yyy
+expect '<>'
+recho $xxx''$yyy
+
+# Test null strings with variable expansion that succeeds
+xxx=abc
+yyy=def
+
+expect '<abc>'
+recho $xxx""
+expect '<abc>'
+recho ""$xxx
+expect '<abc>'
+recho $xxx''
+expect '<abc>'
+recho ''$xxx
+expect '<abcdef>'
+recho $xxx""$yyy
+expect '<abcdef>'
+recho $xxx''$yyy
+
+unset xxx yyy
+
+# Test the unquoted special quoting characters
+expect "<^A>"
+recho
+expect "<^B>"
+recho
+expect "<^A>"
+recho ""
+expect "<^B>"
+recho ""
+expect "<^A>"
+recho ''
+expect "<^B>"
+recho ''
+
+# Test expansion of a variable that is unset
+expect nothing
+recho $xxx
+expect '<>'
+recho "$xxx"
+
+expect nothing
+recho "$xxx${@}"
+
+# Test empty string expansion
+expect '<>'
+recho ""
+expect '<>'
+recho ''
+
+# Test command substitution with (disabled) history substitution
+expect '<Hello World!>'
+# set +H
+recho "`echo \"Hello world!\"`"
+
+# Test some shell special characters
+expect '<`>'
+recho "\`"
+expect '<">'
+recho "\""
+expect '<\^A>'
+recho "\"
+
+expect '<\$>'
+recho "\\$"
+
+expect '<\\>'
+recho "\\\\"
+
+# This should give argv[1] = a argv[2] = b
+expect '<a> <b>'
+FOO=`echo 'a b' | tr ' ' '\012'`
+recho $FOO
+
+# This should give argv[1] = ^A argv[2] = ^B
+expect '<^A> <^B>'
+FOO=`echo ' ' | tr ' ' '\012'`
+recho $FOO
+
+# Test quoted and unquoted globbing characters
+expect '<**>'
+recho "*"*
+
+expect '<\.\./*/>'
+recho "\.\./*/"
+
+# Test patterns that come up when the shell quotes funny character
+# combinations
+expect '<^A^B^A^B>'
+recho ''
+expect '<^A^A>'
+recho ''
+expect '<^A^B>'
+recho ''
+expect '<^A^A^B>'
+recho ''
+
+# More tests of "$@"
+expect '< abc> <def> <ghi> <jkl >'
+set abc def ghi jkl
+recho " $@ "
+
+expect '<--abc> <def> <ghi> <jkl-->'
+set abc def ghi jkl
+recho "--$@--"
+
+expect '< >'
+recho " "
+expect '< - >'
+recho " - "
+
+# Test combinations of different types of quoting in a fully-quoted string
+# (so the WHOLLY_QUOTED tests fail and it doesn't get set)
+expect '</^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>'
+recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/"
+
+# Test the various Posix parameter expansions
+
+expect '<foo bar>'
+recho "${x:-$(echo "foo bar")}"
+expect '<foo> <bar>'
+recho ${x:-$(echo "foo bar")}
+
+unset X
+expect '<abc>'
+recho ${X:=abc}
+expect '<abc>'
+recho $X
+
+set a b c
+expect '<posix>'
+recho ${3:+posix}
+
+POSIX=/usr/posix
+expect '<10>'
+recho ${#POSIX}
+
+# remove shortest trailing match
+x=file.c
+expect '<file.o>'
+recho ${x%.c}.o
+
+# remove longest trailing match
+x=posix/src/std
+expect '<posix>'
+recho ${x%%/*}
+
+# remove shortest leading pattern
+x=$HOME/src/cmd
+expect '</src/cmd>'
+recho ${x#$HOME}
+
+# remove longest leading pattern
+x=/one/two/three
+expect '<three>'
+recho ${x##*/}
+
+# Command substitution and the quirky differences between `` and $()
+
+expect '<\$x>'
+recho '\$x'
+
+expect '<$x>'
+recho `echo '\$x'`
+
+expect '<\$x>'
+recho $(echo '\$x')
+
+# The difference between $* "$*" and "$@"
+
+set "abc" "def ghi" "jkl"
+
+expect '<abc> <def> <ghi> <jkl>'
+recho $*
+
+expect '<abc def ghi jkl>'
+recho "$*"
+
+OIFS="$IFS"
+IFS=":$IFS"
+
+# The special behavior of "$*", using the first character of $IFS as separator
+expect '<abc:def ghi:jkl>'
+recho "$*"
+
+IFS="$OIFS"
+
+expect '<abc> <def ghi> <jkl>'
+recho "$@"
+
+expect '<xxabc> <def ghi> <jklyy>'
+recho "xx$@yy"
+
+expect '<abc> <def ghi> <jklabc> <def ghi> <jkl>'
+recho "$@$@"
+
+foo=abc
+bar=def
+
+expect '<abcdef>'
+recho "$foo""$bar"
+
+unset foo
+set $foo bar '' xyz "$foo" abc
+
+expect '<bar> <> <xyz> <> <abc>'
+recho "$@"
+
+# More tests of quoting and deferred evaluation
+
+foo=10 x=foo
+y='$'$x
+expect '<$foo>'
+recho $y
+eval y='$'$x
+expect '<10>'
+recho $y
+
+# case statements
+
+NL='
+'
+x='ab
+cd'
+
+expect '<newline expected>'
+case "$x" in
+*$NL*) recho "newline expected" ;;
+esac
+
+expect '<got it>'
+case \? in
+*"?"*) recho "got it" ;;
+esac
+
+expect '<got it>'
+case \? in
+*\?*) recho "got it" ;;
+esac
+
+set one two three four five
+expect '<one> <three> <five>'
+recho $1 $3 ${5} $8 ${9}
+expect '<5> <5>'
+recho $# ${#}
+
+expect '<42>'
+recho $((28 + 14))
+expect '<26>'
+recho $[ 13 * 2 ]
+
+expect '<\>'
+recho `echo \\\\`
+
+expect '<~>'
+recho '~'
+
+expect nothing
+recho $!
Index: exp.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/exp.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- exp.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ exp.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,113 +1,113 @@
-argv[1] = <^A>
-argv[1] = <^A>
-argv[1] = <^B>
-argv[1] = <^B>
-argv[1] = <^A>
-argv[1] = <^B>
-argv[1] = <abcdefgh>
-argv[1] = <abcdefgh>
-argv[1] = <abcdefgh>
-argv[1] = <abcdefgh>
-argv[1] = <abcd>
-argv[1] = <abcd>
-argv[1] = < >
-argv[1] = <-->
-argv[1] = <>
-argv[1] = <>
-argv[1] = <>
-argv[1] = <>
-argv[1] = <>
-argv[1] = <>
-argv[1] = <abc>
-argv[1] = <abc>
-argv[1] = <abc>
-argv[1] = <abc>
-argv[1] = <abcdef>
-argv[1] = <abcdef>
-argv[1] = <^A>
-argv[1] = <^B>
-argv[1] = <^A>
-argv[1] = <^B>
-argv[1] = <^A>
-argv[1] = <^B>
-argv[1] = <>
-argv[1] = <>
-argv[1] = <>
-argv[1] = <Hello world!>
-argv[1] = <`>
-argv[1] = <">
-argv[1] = <\^A>
-argv[1] = <\$>
-argv[1] = <\\>
-argv[1] = <a>
-argv[2] = <b>
-argv[1] = <^A>
-argv[2] = <^B>
-argv[1] = <**>
-argv[1] = <\.\./*/>
-argv[1] = <^A^B^A^B>
-argv[1] = <^A^A>
-argv[1] = <^A^B>
-argv[1] = <^A^A^B>
-argv[1] = < abc>
-argv[2] = <def>
-argv[3] = <ghi>
-argv[4] = <jkl >
-argv[1] = <--abc>
-argv[2] = <def>
-argv[3] = <ghi>
-argv[4] = <jkl-->
-argv[1] = < >
-argv[1] = < - >
-argv[1] = </^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>
-argv[1] = <foo bar>
-argv[1] = <foo>
-argv[2] = <bar>
-argv[1] = <abc>
-argv[1] = <abc>
-argv[1] = <posix>
-argv[1] = <10>
-argv[1] = <file.o>
-argv[1] = <posix>
-argv[1] = </src/cmd>
-argv[1] = <three>
-argv[1] = <\$x>
-argv[1] = <$x>
-argv[1] = <\$x>
-argv[1] = <abc>
-argv[2] = <def>
-argv[3] = <ghi>
-argv[4] = <jkl>
-argv[1] = <abc def ghi jkl>
-argv[1] = <abc:def ghi:jkl>
-argv[1] = <abc>
-argv[2] = <def ghi>
-argv[3] = <jkl>
-argv[1] = <xxabc>
-argv[2] = <def ghi>
-argv[3] = <jklyy>
-argv[1] = <abc>
-argv[2] = <def ghi>
-argv[3] = <jklabc>
-argv[4] = <def ghi>
-argv[5] = <jkl>
-argv[1] = <abcdef>
-argv[1] = <bar>
-argv[2] = <>
-argv[3] = <xyz>
-argv[4] = <>
-argv[5] = <abc>
-argv[1] = <$foo>
-argv[1] = <10>
-argv[1] = <newline expected>
-argv[1] = <got it>
-argv[1] = <got it>
-argv[1] = <one>
-argv[2] = <three>
-argv[3] = <five>
-argv[1] = <5>
-argv[2] = <5>
-argv[1] = <42>
-argv[1] = <26>
-argv[1] = <\>
-argv[1] = <~>
+argv[1] = <^A>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <^B>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <abcdefgh>
+argv[1] = <abcdefgh>
+argv[1] = <abcdefgh>
+argv[1] = <abcdefgh>
+argv[1] = <abcd>
+argv[1] = <abcd>
+argv[1] = < >
+argv[1] = <-->
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abcdef>
+argv[1] = <abcdef>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <Hello world!>
+argv[1] = <`>
+argv[1] = <">
+argv[1] = <\^A>
+argv[1] = <\$>
+argv[1] = <\\>
+argv[1] = <a>
+argv[2] = <b>
+argv[1] = <^A>
+argv[2] = <^B>
+argv[1] = <**>
+argv[1] = <\.\./*/>
+argv[1] = <^A^B^A^B>
+argv[1] = <^A^A>
+argv[1] = <^A^B>
+argv[1] = <^A^A^B>
+argv[1] = < abc>
+argv[2] = <def>
+argv[3] = <ghi>
+argv[4] = <jkl >
+argv[1] = <--abc>
+argv[2] = <def>
+argv[3] = <ghi>
+argv[4] = <jkl-->
+argv[1] = < >
+argv[1] = < - >
+argv[1] = </^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>
+argv[1] = <foo bar>
+argv[1] = <foo>
+argv[2] = <bar>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <posix>
+argv[1] = <10>
+argv[1] = <file.o>
+argv[1] = <posix>
+argv[1] = </src/cmd>
+argv[1] = <three>
+argv[1] = <\$x>
+argv[1] = <$x>
+argv[1] = <\$x>
+argv[1] = <abc>
+argv[2] = <def>
+argv[3] = <ghi>
+argv[4] = <jkl>
+argv[1] = <abc def ghi jkl>
+argv[1] = <abc:def ghi:jkl>
+argv[1] = <abc>
+argv[2] = <def ghi>
+argv[3] = <jkl>
+argv[1] = <xxabc>
+argv[2] = <def ghi>
+argv[3] = <jklyy>
+argv[1] = <abc>
+argv[2] = <def ghi>
+argv[3] = <jklabc>
+argv[4] = <def ghi>
+argv[5] = <jkl>
+argv[1] = <abcdef>
+argv[1] = <bar>
+argv[2] = <>
+argv[3] = <xyz>
+argv[4] = <>
+argv[5] = <abc>
+argv[1] = <$foo>
+argv[1] = <10>
+argv[1] = <newline expected>
+argv[1] = <got it>
+argv[1] = <got it>
+argv[1] = <one>
+argv[2] = <three>
+argv[3] = <five>
+argv[1] = <5>
+argv[2] = <5>
+argv[1] = <42>
+argv[1] = <26>
+argv[1] = <\>
+argv[1] = <~>
Index: getopts.sh
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/getopts.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- getopts.sh 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ getopts.sh 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,23 +1,23 @@
-# test getopts parsing
-testit()
-{
- while getopts :a:b:c:d:e:f:g:h:i:j:k:l: opt; do
- case $opt in
- a) ORACLE_HOME="$OPTARG";;
- b) ORASERVICE="$OPTARG";;
- c) DBA_USER="$OPTARG";;
- d) DBA_PW="$OPTARG";;
- e) DB_USER="$OPTARG";;
- f) DB_PASSWD="$OPTARG";;
- g) DB_REPORT_USER="$OPTARG";;
- h) DB_REPORT_PASSWD="$OPTARG";;
- i) APPKEY="$OPTARG";;
- j) DB_SIZE_PARAM="$OPTARG";;
- k) DB_DATAFILE_HOME="$OPTARG";;
- l) DB_INDEXFILE_HOME="$OPTARG";;
- \?) echo "unknown option -$OPTARG" && exit 1;;
- esac
- done
-}
-
-testit -a foo -b bar -c hey -d ra -e top
+# test getopts parsing
+testit()
+{
+ while getopts :a:b:c:d:e:f:g:h:i:j:k:l: opt; do
+ case $opt in
+ a) ORACLE_HOME="$OPTARG";;
+ b) ORASERVICE="$OPTARG";;
+ c) DBA_USER="$OPTARG";;
+ d) DBA_PW="$OPTARG";;
+ e) DB_USER="$OPTARG";;
+ f) DB_PASSWD="$OPTARG";;
+ g) DB_REPORT_USER="$OPTARG";;
+ h) DB_REPORT_PASSWD="$OPTARG";;
+ i) APPKEY="$OPTARG";;
+ j) DB_SIZE_PARAM="$OPTARG";;
+ k) DB_DATAFILE_HOME="$OPTARG";;
+ l) DB_INDEXFILE_HOME="$OPTARG";;
+ \?) echo "unknown option -$OPTARG" && exit 1;;
+ esac
+ done
+}
+
+testit -a foo -b bar -c hey -d ra -e top
Index: glob-test
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/glob-test,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- glob-test 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ glob-test 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,178 +1,178 @@
-#
-# test the shell globbing
-#
-expect()
-{
- echo expect "$@"
-}
-
-TESTDIR=/tmp/glob-test
-mkdir $TESTDIR
-cd $TESTDIR
-
-touch a b c d abc abd abe bb bcd ca cb dd de
-mkdir bdir
-
-# see if `regular' globbing works right
-expect '<a> <abc> <abd> <abe> <X*>'
-recho a* X*
-
-expect '<a> <abc> <abd> <abe>'
-recho \a*
-
-# see if null glob expansion works
-allow_null_glob_expansion=
-
-expect '<a> <abc> <abd> <abe>'
-recho a* X*
-
-unset allow_null_glob_expansion
-
-# see if the code that expands directories only works
-expect '<bdir/>'
-recho b*/
-
-# Test quoted and unquoted globbing characters
-expect '<*>'
-recho \*
-
-expect '<a*>'
-recho 'a*'
-
-expect '<a*>'
-recho a\*
-
-expect '<c> <ca> <cb> <a*> <*q*>'
-recho c* a\* *q*
-
-expect '<**>'
-recho "*"*
-
-expect '<**>'
-recho \**
-
-expect '<\.\./*/>'
-recho "\.\./*/"
-
-expect '<s/\..*//>'
-recho 's/\..*//'
-
-# Pattern from Larry Wall's Configure that caused bash to blow up
-expect '</^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>'
-recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/"
-
-# Make sure character classes work properly
-
-expect '<abc> <abd> <abe> <bb> <cb>'
-recho [a-c]b*
-
-expect '<abd> <abe> <bb> <bcd> <bdir> <ca> <cb> <dd> <de>'
-recho [a-y]*[^c]
-
-expect '<abd> <abe>'
-recho a*[^c]
-
-touch a-b aXb
-expect '<a-b> <aXb>'
-recho a[X-]b
-
-touch .x .y
-expect '<d> <dd> <de>'
-recho [^a-c]*
-
-# Make sure that filenames with embedded globbing characters are handled
-# properly
-mkdir a\*b
-> a\*b/ooo
-
-expect '<a*b/ooo>'
-recho a\*b/*
-
-expect '<a*b/ooo>'
-recho a\*?/*
-
-expect '<no match>'
-cmd='echo !7'
-case "$cmd" in
-*\\!*) echo match ;;
-*) echo no match ;;
-esac
-
-expect '<not there>'
-file='r.*'
-case $file in
-*.\*) echo not there ;;
-*) echo there ;;
-esac
-
-# examples from the Posix.2 spec (d11.2, p. 243)
-expect '<abc>'
-recho a[b]c
-
-expect '<abc>'
-recho a["b"]c
-
-expect '<abc>'
-recho a[\b]c
-
-expect '<abc>'
-recho a?c
-
-expect '<match>'
-case abc in
-a"b"c) echo match
- ;;
-*) echo BAD
- ;;
-esac
-
-expect '<match>'
-case abc in
-a*c) echo match
- ;;
-*) echo BAD
- ;;
-esac
-
-expect '<ok>'
-case abc in
-"a?c") echo bad
- ;;
-*) echo ok
- ;;
-esac
-
-expect '<ok>'
-case abc in
-a\*c) echo bad
- ;;
-*) echo ok
- ;;
-esac
-
-expect '<ok>'
-case abc in
-a\[b]c) echo bad
- ;;
-*) echo ok
- ;;
-esac
-
-expect '<ok>'
-case "$nosuchvar" in
-"") echo ok ;;
-*) echo bad ;;
-esac
-
-# This is very odd, but sh and ksh seem to agree
-expect '<ok>'
-case abc in
-a["\b"]c) echo ok
- ;;
-*) echo bad
- ;;
-esac
-
-cd /
-/bin/rm -rf $TESTDIR
-exit 0
+#
+# test the shell globbing
+#
+expect()
+{
+ echo expect "$@"
+}
+
+TESTDIR=/tmp/glob-test
+mkdir $TESTDIR
+cd $TESTDIR
+
+touch a b c d abc abd abe bb bcd ca cb dd de
+mkdir bdir
+
+# see if `regular' globbing works right
+expect '<a> <abc> <abd> <abe> <X*>'
+recho a* X*
+
+expect '<a> <abc> <abd> <abe>'
+recho \a*
+
+# see if null glob expansion works
+allow_null_glob_expansion=
+
+expect '<a> <abc> <abd> <abe>'
+recho a* X*
+
+unset allow_null_glob_expansion
+
+# see if the code that expands directories only works
+expect '<bdir/>'
+recho b*/
+
+# Test quoted and unquoted globbing characters
+expect '<*>'
+recho \*
+
+expect '<a*>'
+recho 'a*'
+
+expect '<a*>'
+recho a\*
+
+expect '<c> <ca> <cb> <a*> <*q*>'
+recho c* a\* *q*
+
+expect '<**>'
+recho "*"*
+
+expect '<**>'
+recho \**
+
+expect '<\.\./*/>'
+recho "\.\./*/"
+
+expect '<s/\..*//>'
+recho 's/\..*//'
+
+# Pattern from Larry Wall's Configure that caused bash to blow up
+expect '</^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>'
+recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/"
+
+# Make sure character classes work properly
+
+expect '<abc> <abd> <abe> <bb> <cb>'
+recho [a-c]b*
+
+expect '<abd> <abe> <bb> <bcd> <bdir> <ca> <cb> <dd> <de>'
+recho [a-y]*[^c]
+
+expect '<abd> <abe>'
+recho a*[^c]
+
+touch a-b aXb
+expect '<a-b> <aXb>'
+recho a[X-]b
+
+touch .x .y
+expect '<d> <dd> <de>'
+recho [^a-c]*
+
+# Make sure that filenames with embedded globbing characters are handled
+# properly
+mkdir a\*b
+> a\*b/ooo
+
+expect '<a*b/ooo>'
+recho a\*b/*
+
+expect '<a*b/ooo>'
+recho a\*?/*
+
+expect '<no match>'
+cmd='echo !7'
+case "$cmd" in
+*\\!*) echo match ;;
+*) echo no match ;;
+esac
+
+expect '<not there>'
+file='r.*'
+case $file in
+*.\*) echo not there ;;
+*) echo there ;;
+esac
+
+# examples from the Posix.2 spec (d11.2, p. 243)
+expect '<abc>'
+recho a[b]c
+
+expect '<abc>'
+recho a["b"]c
+
+expect '<abc>'
+recho a[\b]c
+
+expect '<abc>'
+recho a?c
+
+expect '<match>'
+case abc in
+a"b"c) echo match
+ ;;
+*) echo BAD
+ ;;
+esac
+
+expect '<match>'
+case abc in
+a*c) echo match
+ ;;
+*) echo BAD
+ ;;
+esac
+
+expect '<ok>'
+case abc in
+"a?c") echo bad
+ ;;
+*) echo ok
+ ;;
+esac
+
+expect '<ok>'
+case abc in
+a\*c) echo bad
+ ;;
+*) echo ok
+ ;;
+esac
+
+expect '<ok>'
+case abc in
+a\[b]c) echo bad
+ ;;
+*) echo ok
+ ;;
+esac
+
+expect '<ok>'
+case "$nosuchvar" in
+"") echo ok ;;
+*) echo bad ;;
+esac
+
+# This is very odd, but sh and ksh seem to agree
+expect '<ok>'
+case abc in
+a["\b"]c) echo ok
+ ;;
+*) echo bad
+ ;;
+esac
+
+cd /
+/bin/rm -rf $TESTDIR
+exit 0
Index: glob.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/glob.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- glob.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ glob.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,63 +1,63 @@
-argv[1] = <a>
-argv[2] = <abc>
-argv[3] = <abd>
-argv[4] = <abe>
-argv[5] = <X*>
-argv[1] = <a>
-argv[2] = <abc>
-argv[3] = <abd>
-argv[4] = <abe>
-argv[1] = <a>
-argv[2] = <abc>
-argv[3] = <abd>
-argv[4] = <abe>
-argv[1] = <bdir/>
-argv[1] = <*>
-argv[1] = <a*>
-argv[1] = <a*>
-argv[1] = <c>
-argv[2] = <ca>
-argv[3] = <cb>
-argv[4] = <a*>
-argv[5] = <*q*>
-argv[1] = <**>
-argv[1] = <**>
-argv[1] = <\.\./*/>
-argv[1] = <s/\..*//>
-argv[1] = </^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>
-argv[1] = <abc>
-argv[2] = <abd>
-argv[3] = <abe>
-argv[4] = <bb>
-argv[5] = <cb>
-argv[1] = <abd>
-argv[2] = <abe>
-argv[3] = <bb>
-argv[4] = <bcd>
-argv[5] = <bdir>
-argv[6] = <ca>
-argv[7] = <cb>
-argv[8] = <dd>
-argv[9] = <de>
-argv[1] = <abd>
-argv[2] = <abe>
-argv[1] = <a-b>
-argv[2] = <aXb>
-argv[1] = <d>
-argv[2] = <dd>
-argv[3] = <de>
-argv[1] = <a*b/ooo>
-argv[1] = <a*b/ooo>
-no match
-not there
-argv[1] = <abc>
-argv[1] = <abc>
-argv[1] = <abc>
-argv[1] = <abc>
-match
-match
-ok
-ok
-ok
-ok
-ok
+argv[1] = <a>
+argv[2] = <abc>
+argv[3] = <abd>
+argv[4] = <abe>
+argv[5] = <X*>
+argv[1] = <a>
+argv[2] = <abc>
+argv[3] = <abd>
+argv[4] = <abe>
+argv[1] = <a>
+argv[2] = <abc>
+argv[3] = <abd>
+argv[4] = <abe>
+argv[1] = <bdir/>
+argv[1] = <*>
+argv[1] = <a*>
+argv[1] = <a*>
+argv[1] = <c>
+argv[2] = <ca>
+argv[3] = <cb>
+argv[4] = <a*>
+argv[5] = <*q*>
+argv[1] = <**>
+argv[1] = <**>
+argv[1] = <\.\./*/>
+argv[1] = <s/\..*//>
+argv[1] = </^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>
+argv[1] = <abc>
+argv[2] = <abd>
+argv[3] = <abe>
+argv[4] = <bb>
+argv[5] = <cb>
+argv[1] = <abd>
+argv[2] = <abe>
+argv[3] = <bb>
+argv[4] = <bcd>
+argv[5] = <bdir>
+argv[6] = <ca>
+argv[7] = <cb>
+argv[8] = <dd>
+argv[9] = <de>
+argv[1] = <abd>
+argv[2] = <abe>
+argv[1] = <a-b>
+argv[2] = <aXb>
+argv[1] = <d>
+argv[2] = <dd>
+argv[3] = <de>
+argv[1] = <a*b/ooo>
+argv[1] = <a*b/ooo>
+no match
+not there
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abc>
+match
+match
+ok
+ok
+ok
+ok
+ok
Index: ifs-test-1.sh
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/ifs-test-1.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ifs-test-1.sh 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ ifs-test-1.sh 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,5 +1,5 @@
-OIFS="$IFS"
-IFS=":$IFS"
-eval foo="a:b:c"
-IFS="$OIFS"
-echo $foo
+OIFS="$IFS"
+IFS=":$IFS"
+eval foo="a:b:c"
+IFS="$OIFS"
+echo $foo
Index: ifs-test-2.sh
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/ifs-test-2.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ifs-test-2.sh 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ ifs-test-2.sh 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,9 +1,9 @@
-OIFS=$IFS
-IFS=":$IFS"
-foo=$(echo a:b:c)
-IFS=$OIFS
-
-for i in $foo
-do
- echo $i
-done
+OIFS=$IFS
+IFS=":$IFS"
+foo=$(echo a:b:c)
+IFS=$OIFS
+
+for i in $foo
+do
+ echo $i
+done
Index: ifs-test-3.sh
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/ifs-test-3.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ifs-test-3.sh 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ ifs-test-3.sh 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,9 +1,9 @@
-OIFS=$IFS
-IFS=":$IFS"
-foo=`echo a:b:c`
-IFS=$OIFS
-
-for i in $foo
-do
- echo $i
-done
+OIFS=$IFS
+IFS=":$IFS"
+foo=`echo a:b:c`
+IFS=$OIFS
+
+for i in $foo
+do
+ echo $i
+done
Index: ifs.1.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/ifs.1.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ifs.1.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ ifs.1.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1 +1 @@
-a:b:c
+a:b:c
Index: ifs.2.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/ifs.2.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ifs.2.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ ifs.2.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1 +1 @@
-a:b:c
+a:b:c
Index: ifs.3.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/ifs.3.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ifs.3.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ ifs.3.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1 +1 @@
-a:b:c
+a:b:c
Index: input-line.sh
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/input-line.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- input-line.sh 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ input-line.sh 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,4 +1,4 @@
-echo before calling input-line.sub
-../bash ./input-line.sub
-this line for input-line.sub
-echo finished with input-line.sub
+echo before calling input-line.sub
+../bash ./input-line.sub
+this line for input-line.sub
+echo finished with input-line.sub
Index: input-line.sub
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/input-line.sub,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- input-line.sub 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ input-line.sub 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,2 +1,2 @@
-read line
-echo line read by $0 was \`$line\'
+read line
+echo line read by $0 was \`$line\'
Index: input.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/input.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- input.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ input.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,3 +1,3 @@
-before calling input-line.sub
-line read by ./input-line.sub was `this line for input-line.sub'
-finished with input-line.sub
+before calling input-line.sub
+line read by ./input-line.sub was `this line for input-line.sub'
+finished with input-line.sub
Index: minus-e
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/minus-e,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- minus-e 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ minus-e 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,6 +1,6 @@
-set -e
-if set +e
-then
- false
-fi
-echo hi
+set -e
+if set +e
+then
+ false
+fi
+echo hi
Index: minus-e.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/minus-e.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- minus-e.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ minus-e.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1 +1 @@
-hi
+hi
Index: new-exp.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/new-exp.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- new-exp.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ new-exp.right 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,33 +1,33 @@
-argv[1] = <foo bar>
-argv[1] = <foo>
-argv[1] = </usr/homes/chet>
-argv[1] = </usr/homes/chet>
-argv[1] = </usr/homes/chet>
-./new-exp.tests: ${HOME:`echo }`}: bad substitution
-./new-exp.tests: ${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]}: bad substitution
-argv[1] = </usr/homes/chet>
-argv[1] = </usr/homes/chet>
-argv[1] = </usr/homes/chet>
-argv[1] = </usr/homes/chet>
-argv[1] = </usr/homes/chet>
-argv[1] = </usr/homes/chet>
-argv[1] = </usr/homes/chet>
-argv[1] = <*@>
-argv[1] = <@*>
-argv[1] = <)>
-argv[1] = <")">
-argv[1] = <-abcd>
-argv[2] = <->
-argv[1] = <-abcd>
-argv[2] = <->
-argv[1] = <-abcd->
-argv[1] = <a b c d e>
-bar foo
-bar foo
-bar foo
-bar foo
-bar foo
-./new-exp.tests: ABX: unbound variable
-./new-exp.tests: $6: cannot assign in this way
-
-./new-exp.tests: ABXD: parameter unset
+argv[1] = <foo bar>
+argv[1] = <foo>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+./new-exp.tests: ${HOME:`echo }`}: bad substitution
+./new-exp.tests: ${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]}: bad substitution
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = <*@>
+argv[1] = <@*>
+argv[1] = <)>
+argv[1] = <")">
+argv[1] = <-abcd>
+argv[2] = <->
+argv[1] = <-abcd>
+argv[2] = <->
+argv[1] = <-abcd->
+argv[1] = <a b c d e>
+bar foo
+bar foo
+bar foo
+bar foo
+bar foo
+./new-exp.tests: ABX: unbound variable
+./new-exp.tests: $6: cannot assign in this way
+
+./new-exp.tests: ABXD: parameter unset
Index: new-exp.tests
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/new-exp.tests,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- new-exp.tests 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ new-exp.tests 9 Mar 2002 04:43:16 -0000 1.2
@@ -1,95 +1,95 @@
-expect()
-{
- echo expect "$@"
-}
-
-HOME=/usr/homes/chet # to make the check against new-exp.right work
-expect '<foo bar>'
-recho "${undef-"foo bar"}" # should be foo bar
-expect '<foo>'
-recho "${und="foo"}" # should be foo
-
-expect "<$HOME>"
-recho ${HOME-"}"}
-expect "<$HOME>"
-recho "${HOME-'}'}"
-expect "<$HOME>"
-recho "${HOME-"}"}"
-
-expect $0: '${HOME:`echo }`}: bad substitution'
-recho "${HOME:`echo }`}" # should be an error -- bad substitution
-
-expect $0: '${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]}: bad substitution'
-x=${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]} # memory leak
-
-expect "<$HOME>"
-recho ${HOME}
-expect "<$HOME>"
-recho ${HOME:-`echo }`}
-expect "<$HOME>"
-recho ${HOME:-`echo "}"`}
-expect "<$HOME>"
-recho "${HOME:-`echo "}"`}"
-expect "<$HOME>"
-recho "$(echo "${HOME}")"
-expect "<$HOME>"
-recho "$(echo "$(echo ${HOME})")"
-expect "<$HOME>"
-recho "$(echo "$(echo "${HOME}")")"
-
-P=*@*
-expect '<*@>'
-recho "${P%"*"}" # should be *@
-expect '<@*>'
-recho "${P#\*}" # should be @*
-
-expect '<)>'
-recho "$(echo ")")" # should be )
-expect '<")">'
-recho "$(echo "\")\"")" # should be ")"
-
-foo='abcd '
-expect '<-abcd> <->'
-recho -${foo}- # should be -abcd -
-expect '<-abcd> <->'
-recho -${foo% *}- # should be -abcd -
-expect '<-abcd->'
-recho -${foo%% *}- # should be -abcd-
-
-set a b c d e
-expect '<a b c d e>'
-IFS=""
-recho "$@"
-IFS='
-'
-
-foo=bar
-expect '<bar foo>'
-echo -n $foo' ' ; echo foo
-
-expect '<bar foo>'
-echo -n $foo" " ; echo foo
-
-expect '<bar foo>'
-echo -n "$foo " ; echo foo
-
-expect '<bar foo>'
-echo -e "$foo\c " ; echo foo
-
-expect '<bar foo>'
-echo -e $foo"\c " ; echo foo
-
-set -u
-expect $0: ABX: unbound variable
-recho ${ABX}
-set +u
-
-expect $0: '$6: cannot assign in this way'
-recho ${6="arg6"}
-
-expect a newline
-echo $abmcde
-
-# this must be last!
-expect $0: 'ABXD: parameter unset'
-recho ${ABXD:?"parameter unset"}
+expect()
+{
+ echo expect "$@"
+}
+
+HOME=/usr/homes/chet # to make the check against new-exp.right work
+expect '<foo bar>'
+recho "${undef-"foo bar"}" # should be foo bar
+expect '<foo>'
+recho "${und="foo"}" # should be foo
+
+expect "<$HOME>"
+recho ${HOME-"}"}
+expect "<$HOME>"
+recho "${HOME-'}'}"
+expect "<$HOME>"
+recho "${HOME-"}"}"
+
+expect $0: '${HOME:`echo }`}: bad substitution'
+recho "${HOME:`echo }`}" # should be an error -- bad substitution
+
+expect $0: '${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]}: bad substitution'
+x=${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]} # memory leak
+
+expect "<$HOME>"
+recho ${HOME}
+expect "<$HOME>"
+recho ${HOME:-`echo }`}
+expect "<$HOME>"
+recho ${HOME:-`echo "}"`}
+expect "<$HOME>"
+recho "${HOME:-`echo "}"`}"
+expect "<$HOME>"
+recho "$(echo "${HOME}")"
+expect "<$HOME>"
+recho "$(echo "$(echo ${HOME})")"
+expect "<$HOME>"
+recho "$(echo "$(echo "${HOME}")")"
+
+P=*@*
+expect '<*@>'
+recho "${P%"*"}" # should be *@
+expect '<@*>'
+recho "${P#\*}" # should be @*
+
+expect '<)>'
+recho "$(echo ")")" # should be )
+expect '<")">'
+recho "$(echo "\")\"")" # should be ")"
+
+foo='abcd '
+expect '<-abcd> <->'
+recho -${foo}- # should be -abcd -
+expect '<-abcd> <->'
+recho -${foo% *}- # should be -abcd -
+expect '<-abcd->'
+recho -${foo%% *}- # should be -abcd-
+
+set a b c d e
+expect '<a b c d e>'
+IFS=""
+recho "$@"
+IFS='
+'
+
+foo=bar
+expect '<bar foo>'
+echo -n $foo' ' ; echo foo
+
+expect '<bar foo>'
+echo -n $foo" " ; echo foo
+
+expect '<bar foo>'
+echo -n "$foo " ; echo foo
+
+expect '<bar foo>'
+echo -e "$foo\c " ; echo foo
+
+expect '<bar foo>'
+echo -e $foo"\c " ; echo foo
+
+set -u
+expect $0: ABX: unbound variable
+recho ${ABX}
+set +u
+
+expect $0: '$6: cannot assign in this way'
+recho ${6="arg6"}
+
+expect a newline
+echo $abmcde
+
+# this must be last!
+expect $0: 'ABXD: parameter unset'
+recho ${ABXD:?"parameter unset"}
Index: prec.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/prec.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- prec.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ prec.right 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,28 +1,28 @@
-`Say' echos its argument. Its return value is of no interest.
-`Truth' echos its argument and returns a TRUE result.
-`False' echos its argument and returns a FALSE result.
-
- Truth 1 && Truth 2 || Say 3 output=12
-( Truth 1 && Truth 2 ) || Say 3 output=12
-
- Truth 1 && False 2 || Say 3 output=123
-( Truth 1 && False 2 ) || Say 3 output=123
-
- False 1 && Truth 2 || Say 3 output=13
-( False 1 && Truth 2 ) || Say 3 output=13
-
- False 1 && False 2 || Say 3 output=13
-( False 1 && False 2 ) || Say 3 output=13
-
-Truth 1 || Truth 2 && Say 3 output=13
-Truth 1 || ( Truth 2 && Say 3 ) output=1
-
-Truth 1 || False 2 && Say 3 output=13
-Truth 1 || ( False 2 && Say 3 ) output=1
-
-False 1 || Truth 2 && Say 3 output=123
-False 1 || ( Truth 2 && Say 3 ) output=123
-
-False 1 || False 2 && Say 3 output=12
-False 1 || ( False 2 && Say 3 ) output=12
-
+`Say' echos its argument. Its return value is of no interest.
+`Truth' echos its argument and returns a TRUE result.
+`False' echos its argument and returns a FALSE result.
+
+ Truth 1 && Truth 2 || Say 3 output=12
+( Truth 1 && Truth 2 ) || Say 3 output=12
+
+ Truth 1 && False 2 || Say 3 output=123
+( Truth 1 && False 2 ) || Say 3 output=123
+
+ False 1 && Truth 2 || Say 3 output=13
+( False 1 && Truth 2 ) || Say 3 output=13
+
+ False 1 && False 2 || Say 3 output=13
+( False 1 && False 2 ) || Say 3 output=13
+
+Truth 1 || Truth 2 && Say 3 output=13
+Truth 1 || ( Truth 2 && Say 3 ) output=1
+
+Truth 1 || False 2 && Say 3 output=13
+Truth 1 || ( False 2 && Say 3 ) output=1
+
+False 1 || Truth 2 && Say 3 output=123
+False 1 || ( Truth 2 && Say 3 ) output=123
+
+False 1 || False 2 && Say 3 output=12
+False 1 || ( False 2 && Say 3 ) output=12
+
Index: precedence
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/precedence,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- precedence 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ precedence 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,75 +1,75 @@
-# @(#)precedence_test 1.0 91/07/24 Maarten Litmaath
-# test of relative precedences for `&&' and `||' operators
-
-echo "\`Say' echos its argument. Its return value is of no interest."
-case `echo -n` in
- '') Say () { echo -n "$*" ; } ;;
- *) Say () { echo "$*\c" ; } ;;
-esac
-
-echo "\`Truth' echos its argument and returns a TRUE result."
-Truth () {
- Say $1;
- return 0;
-}
-
-echo "\`False' echos its argument and returns a FALSE result."
-False () {
- Say $1;
- return 1;
-}
-
-echo ""
-
-cmd1='$open $test1 && $test2 $close || $test3'
-cmd2='$test1 || $open $test2 && $test3 $close'
-
-grouping_sh=
-grouping_C='( )'
-
-test3='Say 3'
-
-for i in 1 2
-do
- eval proto=\$cmd$i
-
- for test1 in 'Truth 1' 'False 1'
- do
- for test2 in 'Truth 2' 'False 2'
- do
- for precedence in sh C
- do
- eval set x \$grouping_$precedence
- shift
- open=${1-' '}
- close=${2-' '}
- eval cmd=\""$proto"\"
- Say "$cmd output="
- output=`eval "$cmd"`
- Say "$output"
- read correct || { echo 'Input fubar. Abort.' >&2; exit 1; }
- test "X$output" = "X$correct" || echo " correct=$correct"
- echo ''
- done
-
- echo ''
- done
- done
-done << EOF
-12
-12
-123
-123
-13
-13
-13
-13
-13
-1
-13
-1
-123
-123
-12
-12
-EOF
+# @(#)precedence_test 1.0 91/07/24 Maarten Litmaath
+# test of relative precedences for `&&' and `||' operators
+
+echo "\`Say' echos its argument. Its return value is of no interest."
+case `echo -n` in
+ '') Say () { echo -n "$*" ; } ;;
+ *) Say () { echo "$*\c" ; } ;;
+esac
+
+echo "\`Truth' echos its argument and returns a TRUE result."
+Truth () {
+ Say $1;
+ return 0;
+}
+
+echo "\`False' echos its argument and returns a FALSE result."
+False () {
+ Say $1;
+ return 1;
+}
+
+echo ""
+
+cmd1='$open $test1 && $test2 $close || $test3'
+cmd2='$test1 || $open $test2 && $test3 $close'
+
+grouping_sh=
+grouping_C='( )'
+
+test3='Say 3'
+
+for i in 1 2
+do
+ eval proto=\$cmd$i
+
+ for test1 in 'Truth 1' 'False 1'
+ do
+ for test2 in 'Truth 2' 'False 2'
+ do
+ for precedence in sh C
+ do
+ eval set x \$grouping_$precedence
+ shift
+ open=${1-' '}
+ close=${2-' '}
+ eval cmd=\""$proto"\"
+ Say "$cmd output="
+ output=`eval "$cmd"`
+ Say "$output"
+ read correct || { echo 'Input fubar. Abort.' >&2; exit 1; }
+ test "X$output" = "X$correct" || echo " correct=$correct"
+ echo ''
+ done
+
+ echo ''
+ done
+ done
+done << EOF
+12
+12
+123
+123
+13
+13
+13
+13
+13
+1
+13
+1
+123
+123
+12
+12
+EOF
Index: run-all
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-all,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-all 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-all 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,16 +1,16 @@
-#! /bin/sh
-
-PATH=$PATH:.
-export PATH
-
-echo Any output from any test indicates an anomaly worth investigating
-for x in run-*
-do
- case $x in
- $0) ;;
- *.orig|*~) ;;
- *) echo $x ; sh $x ;;
- esac
-done
-
-exit 0
+#! /bin/sh
+
+PATH=$PATH:.
+export PATH
+
+echo Any output from any test indicates an anomaly worth investigating
+for x in run-*
+do
+ case $x in
+ $0) ;;
+ *.orig|*~) ;;
+ *) echo $x ; sh $x ;;
+ esac
+done
+
+exit 0
Index: run-dollars
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-dollars,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-dollars 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-dollars 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,3 +1,3 @@
-../bash ./dollar-star.sh a b > x 2>&1
-../bash ./dollar-at.sh a b >>x 2>&1
-diff x dollar.right && rm -f x
+../bash ./dollar-star.sh a b > x 2>&1
+../bash ./dollar-at.sh a b >>x 2>&1
+diff x dollar.right && rm -f x
Index: run-exp-tests
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-exp-tests,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-exp-tests 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-exp-tests 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-../bash ./exp-tests | grep -v '^expect' > xx
-diff xx exp.right && rm -f xx
+../bash ./exp-tests | grep -v '^expect' > xx
+diff xx exp.right && rm -f xx
Index: run-glob-test
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-glob-test,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-glob-test 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-glob-test 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,4 +1,4 @@
-PATH=$PATH:`pwd`
-export PATH
-../bash ./glob-test | grep -v '^expect' > xx
-diff xx glob.right && rm -f xx
+PATH=$PATH:`pwd`
+export PATH
+../bash ./glob-test | grep -v '^expect' > xx
+diff xx glob.right && rm -f xx
Index: run-ifs-tests
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-ifs-tests,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-ifs-tests 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-ifs-tests 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,13 +1,13 @@
-#
-# show that IFS is only applied to the result of expansions
-#
-../bash ifs-test-1.sh > xx
-diff xx ./ifs.1.right
-
-../bash ifs-test-2.sh > xx
-diff xx ./ifs.2.right
-
-../bash ifs-test-3.sh > xx
-diff xx ./ifs.3.right
-
-rm -f xx
+#
+# show that IFS is only applied to the result of expansions
+#
+../bash ifs-test-1.sh > xx
+diff xx ./ifs.1.right
+
+../bash ifs-test-2.sh > xx
+diff xx ./ifs.2.right
+
+../bash ifs-test-3.sh > xx
+diff xx ./ifs.3.right
+
+rm -f xx
Index: run-input-test
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-input-test,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-input-test 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-input-test 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-../bash < ./input-line.sh > xx
-diff xx input.right && rm -f xx
+../bash < ./input-line.sh > xx
+diff xx input.right && rm -f xx
Index: run-minus-e
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-minus-e,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-minus-e 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-minus-e 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-../bash ./minus-e > xx
-diff xx minus-e.right && rm -f xx
+../bash ./minus-e > xx
+diff xx minus-e.right && rm -f xx
Index: run-new-exp
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-new-exp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-new-exp 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-new-exp 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-../bash ./new-exp.tests 2>&1 | grep -v '^expect' > xx
-diff xx new-exp.right && rm -f xx
+../bash ./new-exp.tests 2>&1 | grep -v '^expect' > xx
+diff xx new-exp.right && rm -f xx
Index: run-precedence
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-precedence,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-precedence 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-precedence 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-../bash ./precedence > xx
-diff xx prec.right && rm -f xx
+../bash ./precedence > xx
+diff xx prec.right && rm -f xx
Index: run-set-e-test
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-set-e-test,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-set-e-test 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-set-e-test 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-../bash ./set-e-test > xx
-diff xx set-e.right && rm -f xx
+../bash ./set-e-test > xx
+diff xx set-e.right && rm -f xx
Index: run-strip
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-strip,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-strip 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-strip 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-../bash ./strip.tests > xx
-diff xx strip.right && rm -f xx
+../bash ./strip.tests > xx
+diff xx strip.right && rm -f xx
Index: run-varenv
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/run-varenv,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- run-varenv 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ run-varenv 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-../bash ./varenv.sh | grep -v '^expect' > xx
-diff xx varenv.right && rm -f xx
+../bash ./varenv.sh | grep -v '^expect' > xx
+diff xx varenv.right && rm -f xx
Index: set-e-test
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/set-e-test,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- set-e-test 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ set-e-test 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,16 +1,16 @@
-if : ; then
- set -e
- N=95
- while :; do
- # expr returns 1 if expression is null or 0
- set +e
- N_MOD_100=`expr $N % 100`
- set -e
- echo $N_MOD_100
- N=`expr $N + 1`
- if [ $N -eq 110 ]; then
- break
- fi
- done
- set +e
-fi
+if : ; then
+ set -e
+ N=95
+ while :; do
+ # expr returns 1 if expression is null or 0
+ set +e
+ N_MOD_100=`expr $N % 100`
+ set -e
+ echo $N_MOD_100
+ N=`expr $N + 1`
+ if [ $N -eq 110 ]; then
+ break
+ fi
+ done
+ set +e
+fi
Index: set-e.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/set-e.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- set-e.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ set-e.right 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,15 +1,15 @@
-95
-96
-97
-98
-99
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
+95
+96
+97
+98
+99
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
Index: strip.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/strip.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- strip.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ strip.right 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,12 +1,12 @@
-''
-' ab '
-' '
-''
-''
-''
-'ababababababab'
-'ababababababab '
-'ababababababab '
-'abababa
-bababab '
-''
+''
+' ab '
+' '
+''
+''
+''
+'ababababababab'
+'ababababababab '
+'ababababababab '
+'abababa
+bababab '
+''
Index: strip.tests
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/strip.tests,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- strip.tests 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ strip.tests 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,22 +1,22 @@
-v=`echo "" ; echo "" ; echo ""`
-echo "'$v'"
-v=`echo -n " ab "`
-echo "'$v'"
-v=`echo -n " "`
-echo "'$v'"
-v=`echo -n ""`
-echo "'$v'"
-v=`echo ""`
-echo "'$v'"
-v=`echo`
-echo "'$v'"
-v=`echo ababababababab`
-echo "'$v'"
-v=`echo "ababababababab "`
-echo "'$v'"
-v=`echo -n "ababababababab "`
-echo "'$v'"
-v=`echo -ne "abababa\nbababab "`
-echo "'$v'"
-v="`echo -e '\n\n\n\n'`"
-echo "'$v'"
+v=`echo "" ; echo "" ; echo ""`
+echo "'$v'"
+v=`echo -n " ab "`
+echo "'$v'"
+v=`echo -n " "`
+echo "'$v'"
+v=`echo -n ""`
+echo "'$v'"
+v=`echo ""`
+echo "'$v'"
+v=`echo`
+echo "'$v'"
+v=`echo ababababababab`
+echo "'$v'"
+v=`echo "ababababababab "`
+echo "'$v'"
+v=`echo -n "ababababababab "`
+echo "'$v'"
+v=`echo -ne "abababa\nbababab "`
+echo "'$v'"
+v="`echo -e '\n\n\n\n'`"
+echo "'$v'"
Index: tilde-tests
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/tilde-tests,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- tilde-tests 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ tilde-tests 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,16 +1,16 @@
-HOME=/usr/xyz
-set -v
-echo ~chet
-echo ~ch\et
-echo ~chet/"foo"
-echo "~chet"/"foo"
-echo \~chet/"foo"
-echo \~chet/bar
-echo ~\chet/bar
-echo ~chet""/bar
-echo ":~chet/"
-echo abcd~chet
-echo "SHELL=~/bash"
-echo SHELL=~/bash
-echo abcd:~chet
-echo PATH=/usr/ucb:/bin:~/bin:~/tmp/bin:/usr/bin
+HOME=/usr/xyz
+set -v
+echo ~chet
+echo ~ch\et
+echo ~chet/"foo"
+echo "~chet"/"foo"
+echo \~chet/"foo"
+echo \~chet/bar
+echo ~\chet/bar
+echo ~chet""/bar
+echo ":~chet/"
+echo abcd~chet
+echo "SHELL=~/bash"
+echo SHELL=~/bash
+echo abcd:~chet
+echo PATH=/usr/ucb:/bin:~/bin:~/tmp/bin:/usr/bin
Index: tilde.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/tilde.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- tilde.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ tilde.right 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,14 +1,14 @@
-/usr/homes/chet
-~chet
-/usr/homes/chet/foo
-~chet/foo
-~chet/foo
-~chet/bar
-~chet/bar
-~chet/bar
-:~chet/
-abcd~chet
-SHELL=~/bash
-SHELL=/usr/xyz/bash
-abcd:~chet
-PATH=/usr/ucb:/bin:~/bin:~/tmp/bin:/usr/bin
+/usr/homes/chet
+~chet
+/usr/homes/chet/foo
+~chet/foo
+~chet/foo
+~chet/bar
+~chet/bar
+~chet/bar
+:~chet/
+abcd~chet
+SHELL=~/bash
+SHELL=/usr/xyz/bash
+abcd:~chet
+PATH=/usr/ucb:/bin:~/bin:~/tmp/bin:/usr/bin
Index: varenv.right
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/varenv.right,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- varenv.right 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ varenv.right 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,14 +1,14 @@
-3 4
-5 6 7 8 9
-7 8 9
-/usr/chet
-/usr/chet
-/usr/chet
-/a/b/c
-/usr/chet
-/usr/chet 7
-/a/b/c 9 /a/b/c
-/a/b/c 9 /a/b/c
-/a/b/c /a/b/c
-1 2
-1 1
+3 4
+5 6 7 8 9
+7 8 9
+/usr/chet
+/usr/chet
+/usr/chet
+/a/b/c
+/usr/chet
+/usr/chet 7
+/a/b/c 9 /a/b/c
+/a/b/c 9 /a/b/c
+/a/b/c /a/b/c
+1 2
+1 1
Index: varenv.sh
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/varenv.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- varenv.sh 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ varenv.sh 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,94 +1,94 @@
-#
-# varenv.sh
-#
-# Test the behavior of the shell with respect to variable and environment
-# assignments
-#
-expect()
-{
- echo expect "$@"
-}
-
-a=1
-b=2
-c=3
-d=4
-e=5
-f=6 g=7 h=8
-
-a=3 b=4 $CHMOD $MODE $FN
-
-# This should echo "3 4" according to Posix.2
-expect "3 4"
-echo $a $b
-
-set -k
-
-# Assignment statements made when no words are left affect the shell's
-# environment
-a=5 b=6 $CHMOD c=7 $MODE d=8 $FN e=9
-
-expect "5 6 7 8 9"
-echo $a $b $c $d $e
-
-$CHMOD f=7 $MODE g=8 $FN h=9
-expect "7 8 9"
-echo $f $g $h
-
-set +k
-
-# The temporary environment does not affect variable expansion, only the
-# environment given to the command
-
-export HOME=/usr/chet
-expect $HOME
-echo $HOME
-
-expect $HOME
-HOME=/a/b/c /bin/echo $HOME
-
-expect $HOME
-echo $HOME
-
-# This should echo /a/b/c
-expect /a/b/c
-HOME=/a/b/c printenv HOME
-
-set -k
-
-# This should echo $HOME 9, NOT /a/b/c 9
-
-expect "$HOME"
-HOME=/a/b/c /bin/echo $HOME c=9
-expect "$HOME 7"
-echo $HOME $c
-
-# I claim the next two echo calls should give identical output.
-# ksh agrees, the System V.3 sh does not
-
-expect "/a/b/c 9 /a/b/c"
-HOME=/a/b/c $ECHO a=$HOME c=9
-echo $HOME $c $a
-
-expect "/a/b/c 9 /a/b/c"
-HOME=/a/b/c a=$HOME c=9
-echo $HOME $c $a
-set +k
-
-# How do assignment statements affect subsequent assignments on the same
-# line?
-expect "/a/b/c /a/b/c"
-HOME=/a/b/c a=$HOME
-echo $HOME $a
-
-# The system V.3 sh does this wrong; the last echo should output "1 1",
-# but the system V.3 sh has it output "2 2". Posix.2 says the assignment
-# statements are processed left-to-right. bash and ksh output the right
-# thing
-c=1
-d=2
-expect "1 2"
-echo $c $d
-d=$c c=$d
-expect "1 1"
-echo $c $d
+#
+# varenv.sh
+#
+# Test the behavior of the shell with respect to variable and environment
+# assignments
+#
+expect()
+{
+ echo expect "$@"
+}
+
+a=1
+b=2
+c=3
+d=4
+e=5
+f=6 g=7 h=8
+
+a=3 b=4 $CHMOD $MODE $FN
+
+# This should echo "3 4" according to Posix.2
+expect "3 4"
+echo $a $b
+
+set -k
+
+# Assignment statements made when no words are left affect the shell's
+# environment
+a=5 b=6 $CHMOD c=7 $MODE d=8 $FN e=9
+
+expect "5 6 7 8 9"
+echo $a $b $c $d $e
+
+$CHMOD f=7 $MODE g=8 $FN h=9
+expect "7 8 9"
+echo $f $g $h
+
+set +k
+
+# The temporary environment does not affect variable expansion, only the
+# environment given to the command
+
+export HOME=/usr/chet
+expect $HOME
+echo $HOME
+
+expect $HOME
+HOME=/a/b/c /bin/echo $HOME
+
+expect $HOME
+echo $HOME
+
+# This should echo /a/b/c
+expect /a/b/c
+HOME=/a/b/c printenv HOME
+
+set -k
+
+# This should echo $HOME 9, NOT /a/b/c 9
+
+expect "$HOME"
+HOME=/a/b/c /bin/echo $HOME c=9
+expect "$HOME 7"
+echo $HOME $c
+
+# I claim the next two echo calls should give identical output.
+# ksh agrees, the System V.3 sh does not
+
+expect "/a/b/c 9 /a/b/c"
+HOME=/a/b/c $ECHO a=$HOME c=9
+echo $HOME $c $a
+
+expect "/a/b/c 9 /a/b/c"
+HOME=/a/b/c a=$HOME c=9
+echo $HOME $c $a
+set +k
+
+# How do assignment statements affect subsequent assignments on the same
+# line?
+expect "/a/b/c /a/b/c"
+HOME=/a/b/c a=$HOME
+echo $HOME $a
+
+# The system V.3 sh does this wrong; the last echo should output "1 1",
+# but the system V.3 sh has it output "2 2". Posix.2 says the assignment
+# statements are processed left-to-right. bash and ksh output the right
+# thing
+c=1
+d=2
+expect "1 2"
+echo $c $d
+d=$c c=$d
+expect "1 1"
+echo $c $d
Index: x
===================================================================
RCS file: /cvsroot/winbash/winbash/tests/x,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- x 9 Mar 2002 03:39:13 -0000 1.1.1.1
+++ x 9 Mar 2002 04:43:17 -0000 1.2
@@ -1,2 +1,2 @@
-./dollar-star.sh: recho: command not found
-./dollar-at.sh: recho: command not found
+./dollar-star.sh: recho: command not found
+./dollar-at.sh: recho: command not found
Index: xx
=======...
[truncated message content] |