X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=tests%2Ftest-imagex;h=2c729cb4b468d4077e153d6f4bfc7542af3a30da;hb=5ab1d0645f63d09334d1b2573e36c033d078f4f2;hp=faae7d4b40fd890d889ceb01b1bdff66d9d0f318;hpb=ed828dc4cbf4eabc9f8b32cb4c6a86a04e087f7a;p=wimlib diff --git a/tests/test-imagex b/tests/test-imagex index faae7d4b..2c729cb4 100755 --- a/tests/test-imagex +++ b/tests/test-imagex @@ -9,7 +9,7 @@ cd tests imagex() { echo "imagex $@" - ../imagex $@ + ../imagex $@ } cleanup() { @@ -260,12 +260,14 @@ echo "Testing appending non-existent file (should generate errors)" if imagex append SOME_NONEXISTENT_FILE dir.wim; then error "Incorrectly succeeded to append non-existent file to WIM" fi -echo "Testing appending directory containing unreadable file (should generate errors)" -mkdir -p dir3 -echo 1 > dir3/file -chmod -r dir3/file -if imagex append dir3 dir.wim; then - error "Incorrectly succeeded in capturing directory with unreadable file" +if [ `id -u` != 0 ]; then + echo "Testing appending directory containing unreadable file (should generate errors)" + mkdir -p dir3 + echo 1 > dir3/file + chmod -r dir3/file + if imagex append dir3 dir.wim; then + error "Incorrectly succeeded in capturing directory with unreadable file" + fi fi rm -rf dir3 dir.wim @@ -361,7 +363,7 @@ fi if test "`stat -c %i tmp/subdir/hello`" = "`stat -c %i tmp/subdir/hello2`"; then error "Incorrect inode number" fi -if ! test -L tmp/subdir/hello || ! test -L tmp/subdir/hello2; then +if ! test -L tmp/subdir/hello -o -L tmp/subdir/hello2 -o -L tmp/subdir/hellolink; then error "Expected symlinks, but found non-symlinks" fi rm -rf dir.wim tmp @@ -610,5 +612,5 @@ if imagex export dir.wim all new.wim --boot; then fi echo "**********************************************************" -echo " All tests passed " +echo " Basic imagex tests passed " echo "**********************************************************"