On Wed, 28 Jun 2006 00:59:24 +0200 Roland Mainz wrote:
> ## ./src/cmd/ksh93/tests/options.sh
> ./src/cmd/ksh93/tests/options.sh[99]: ** not working with -G
> option
> ./src/cmd/ksh93/tests/options.sh[101]: **/*.c not working with
> -G option
> ./src/cmd/ksh93/tests/options.sh[118]: ./-ksh ignores .profile
run this snippet and post options-G.out
---
SHELL=the-ksh-under-test
cat > options-G.sh <<'!'
function err_exit
{
print -r -u2 -- "$@"
}
if command set -G 2> /dev/null
then mkdir /tmp/ksh$$
cd /tmp/ksh$$
mkdir bar foo
> bar.c > bam.c
> bar/foo.c > bar/bam.c
> foo/bam.c
set -- **.c
expected='bam.c bar.c'
[[ $* == $expected ]] || err_exit "-G **.c failed -- expected
'$expected', got '$*'"
set -- **
expected='bam.c bar bar.c bar/bam.c bar/foo.c foo foo/bam.c'
[[ $* == $expected ]] || err_exit "-G ** failed -- expected
'$expected', got '$*'"
set -- **/*.c
expected='bam.c bar.c bar/bam.c bar/foo.c foo/bam.c'
[[ $* == $expected ]] || err_exit "-G **/*.c failed -- expected
'$expected', got '$*'"
set -- **/bam.c
expected='bam.c bar/bam.c foo/bam.c'
[[ $* == $expected ]] || err_exit "-G **/bam.c failed -- expected
'$expected', got '$*'"
cd ~-
rm -rf /tmp/ksh$$
fi
!
PS1='+$LINENO+ ' $SHELL -x options-G.sh > options-G.out 2>&1