diff options
Diffstat (limited to 'tests/07_dir_add_remove.sh')
-rwxr-xr-x | tests/07_dir_add_remove.sh | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/07_dir_add_remove.sh b/tests/07_dir_add_remove.sh index eed19d2..a213de1 100755 --- a/tests/07_dir_add_remove.sh +++ b/tests/07_dir_add_remove.sh @@ -12,19 +12,25 @@ TEST_TOOLS=$3 ############# Test specific code ############ setup () { - mkdir -p $ORIGIN/remove/1/2/3/4 && \ - mkdir -p $TARGET/add/4/3/2/1 && \ - chown -h :cdrom $TARGET/add - chown -h :cdrom $TARGET/add/4/3/2/1 + mkdir -p $ORIGIN/remove/1/2/3/4 && + mkdir -p $TARGET/add/4/3/2/1 && + mkdir -p $TARGET/addsticky && + mkdir -p $TARGET/addsetgid && + chown -h :cdrom $TARGET/add && + chown -h :cdrom $TARGET/add/4/3/2/1 && + chmod +t $TARGET/addsticky && + chmod g+s $TARGET/addsetgid } check_results () { - test -d $ORIGIN/add/4/3/2/1 && \ - test ! -d $ORIGIN/remove && \ - check_same_mtime $ORIGIN/add $TARGET/add && \ - check_same_mode $ORIGIN/add $TARGET/add && \ - check_same_uidgid $ORIGIN/add $TARGET/add && \ - check_same_mode $ORIGIN/add $TARGET/add && \ + test -d $ORIGIN/add/4/3/2/1 && + test ! -d $ORIGIN/remove && + test -k $ORIGIN/addsticky && + test -g $ORIGIN/addsetgid && + check_same_mtime $ORIGIN/add $TARGET/add && + check_same_mode $ORIGIN/add $TARGET/add && + check_same_uidgid $ORIGIN/add $TARGET/add && + check_same_mode $ORIGIN/add $TARGET/add && check_same_uidgid $ORIGIN/add/4/3/2/1 $TARGET/add/4/3/2/1 } |