From b6e2d5a26ac478ce3409cab32dac704f2db61ac6 Mon Sep 17 00:00:00 2001 From: Mike Bonnet Date: Wed, 12 Dec 2007 18:24:40 -0500 Subject: if --chroot only has one argument, pass it to doChroot() as a string instead of a list to support legacy quoting rules Signed-off-by: Michael E Brown --- docs/releasetests.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs') diff --git a/docs/releasetests.sh b/docs/releasetests.sh index df82523..d627bff 100755 --- a/docs/releasetests.sh +++ b/docs/releasetests.sh @@ -75,6 +75,24 @@ if [ $? -ne 5 ]; then fi set -e +# +# Test that chroot with one arg is getting passed though a shell (via os.system()) +# +time $MOCKCMD --offline --chroot 'touch /tmp/{foo,bar,baz}' +if [ ! -f $CHROOT/tmp/foo ] || [ ! -f $CHROOT/tmp/bar ] || [ ! -f $CHROOT/tmp/baz ]; then + echo "'mock --chroot' with one argument is not being passed to os.system()" + exit 1 +fi + +# +# Test that chroot with more than one arg is not getting passed through a shell +# +time $MOCKCMD --offline --chroot touch '/tmp/{quux,wibble}' +if [ ! -f $CHROOT/tmp/\{quux,wibble\} ] || [ -f $CHROOT/tmp/quux ] || [ -f $CHROOT/tmp/wibble ]; then + echo "'mock --chroot' with more than one argument is being passed to os.system()" + exit 1 +fi + # # Test offline build # -- cgit