From cc461736d6ca3c3b809390d8d7873a136e3b899a Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 10 Sep 2010 10:19:22 +0200 Subject: hush: fixes to testsuite Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-bugs/export_exp.tests | 19 ------------------- .../hush_test/hush-bugs/export_exp.tests.disabled | 22 ++++++++++++++++++++++ shell/hush_test/hush-trap/subshell.tests | 11 +++++------ 3 files changed, 27 insertions(+), 25 deletions(-) delete mode 100755 shell/hush_test/hush-bugs/export_exp.tests create mode 100644 shell/hush_test/hush-bugs/export_exp.tests.disabled (limited to 'shell') diff --git a/shell/hush_test/hush-bugs/export_exp.tests b/shell/hush_test/hush-bugs/export_exp.tests deleted file mode 100755 index 91f57aa2c..000000000 --- a/shell/hush_test/hush-bugs/export_exp.tests +++ /dev/null @@ -1,19 +0,0 @@ -v="a=aa0 b=bb0" -# only 1st arg should be expanded in multiple words -export $v c=$v -echo $a $b -echo $c - -# only 1st arg should be expanded in multiple words -export `echo a=aa1 b=bb1` c=`echo a=aa1 b=bb1` -echo $a $b -echo $c - ->zz=zz ->zzz=zzz -# only 1st arg should be globbed -export zzz* zz=* -env | grep ^zz | sort -rm -rf zz=zz zzz=zzz - -echo Done diff --git a/shell/hush_test/hush-bugs/export_exp.tests.disabled b/shell/hush_test/hush-bugs/export_exp.tests.disabled new file mode 100644 index 000000000..0913fd3f2 --- /dev/null +++ b/shell/hush_test/hush-bugs/export_exp.tests.disabled @@ -0,0 +1,22 @@ +# This test shows a very special handling of export and local +# builtins by bash. + +v="a=aa0 b=bb0" +# only 1st arg should be expanded in multiple words +export $v c=$v +echo $a $b +echo $c + +# only 1st arg should be expanded in multiple words +export `echo a=aa1 b=bb1` c=`echo a=aa1 b=bb1` +echo $a $b +echo $c + +>zz=zz +>zzz=zzz +# only 1st arg should be globbed +export zzz* zz=* +env | grep ^zz | sort +rm -rf zz=zz zzz=zzz + +echo Done diff --git a/shell/hush_test/hush-trap/subshell.tests b/shell/hush_test/hush-trap/subshell.tests index 045294bf4..d877f2b82 100755 --- a/shell/hush_test/hush-trap/subshell.tests +++ b/shell/hush_test/hush-trap/subshell.tests @@ -11,10 +11,9 @@ trap 'bad: caught WINCH' WINCH # With TERM we'll check whether it is reset trap 'bad: caught TERM' TERM -# using bash, because we don't have $PPID (yet) -(trap; bash -c 'kill -HUP $PPID'; echo Ok) -(trap; bash -c 'kill -QUIT $PPID'; echo Ok) -(trap; bash -c 'kill -SYS $PPID'; echo Ok) -(trap; bash -c 'kill -WINCH $PPID'; echo Ok) -(trap; bash -c 'kill -TERM $PPID'; echo Bad: TERM is not reset) +(trap; "$THIS_SH" -c 'kill -HUP $PPID'; echo Ok) +(trap; "$THIS_SH" -c 'kill -QUIT $PPID'; echo Ok) +(trap; "$THIS_SH" -c 'kill -SYS $PPID'; echo Ok) +(trap; "$THIS_SH" -c 'kill -WINCH $PPID'; echo Ok) +(trap; "$THIS_SH" -c 'kill -TERM $PPID'; echo Bad: TERM is not reset) echo Done -- cgit v1.2.3