]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
testprogs: Reformat test_special_group.sh
authorAndreas Schneider <asn@samba.org>
Fri, 22 Apr 2022 13:46:05 +0000 (15:46 +0200)
committerPavel Filipensky <pfilipensky@samba.org>
Wed, 10 Aug 2022 10:21:48 +0000 (10:21 +0000)
shfmt -w -p -i 0 -fn testprogs/blackbox/test_special_group.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Wed Aug 10 10:21:48 UTC 2022 on sn-devel-184

testprogs/blackbox/test_special_group.sh

index 84bb95f7b8fbf7c8850f81a24ddd1c90957cc6af..00b5dde5670bb8cfd3dbc2ca593f297ae7144176 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 
 if [ $# -lt 1 ]; then
-cat <<EOF
+       cat <<EOF
 Usage: $0 PREFIX
 EOF
-exit 1;
+       exit 1
 fi
 
 PREFIX_ABS="$1"
@@ -12,40 +12,42 @@ shift 1
 
 failed=0
 
-. `dirname $0`/subunit.sh
-. `dirname $0`/common_test_fns.inc
+. $(dirname $0)/subunit.sh
+. $(dirname $0)/common_test_fns.inc
 
 OLD_RELEASE="release-4-5-0-pre1"
 old_release_dir="$SRCDIR_ABS/source4/selftest/provisions/$OLD_RELEASE"
 
 samba_tdbrestore="tdbrestore"
 if [ -x "$BINDIR/tdbrestore" ]; then
-    samba_tdbrestore="$BINDIR/tdbrestore"
+       samba_tdbrestore="$BINDIR/tdbrestore"
 fi
 
 samba_undump="$SRCDIR_ABS/source4/selftest/provisions/undump.sh"
 
 cleanup_output_directories()
 {
-    remove_directory $PREFIX_ABS/$OLD_RELEASE
+       remove_directory $PREFIX_ABS/$OLD_RELEASE
 }
 
-undump_old() {
-    $samba_undump $old_release_dir $PREFIX_ABS/$OLD_RELEASE $samba_tdbrestore
+undump_old()
+{
+       $samba_undump $old_release_dir $PREFIX_ABS/$OLD_RELEASE $samba_tdbrestore
 }
 
-add_special_group() {
-    $PYTHON $BINDIR/samba-tool group add 'protected users' --special -H tdb://$PREFIX_ABS/$OLD_RELEASE/private/sam.ldb
+add_special_group()
+{
+       $PYTHON $BINDIR/samba-tool group add 'protected users' --special -H tdb://$PREFIX_ABS/$OLD_RELEASE/private/sam.ldb
 }
 
 # double-check we cleaned up from the last test run
 cleanup_output_directories
 
-testit $OLD_RELEASE undump_old || failed=`expr $failed + 1`
+testit $OLD_RELEASE undump_old || failed=$(expr $failed + 1)
 
-testit "add_special_group" add_special_group || failed=`expr $failed + 1`
+testit "add_special_group" add_special_group || failed=$(expr $failed + 1)
 
-testit_expect_failure_grep "add_duplicate_special_group" "Failed to add group.*already exists" add_special_group || failed=`expr $failed + 1`
+testit_expect_failure_grep "add_duplicate_special_group" "Failed to add group.*already exists" add_special_group || failed=$(expr $failed + 1)
 
 cleanup_output_directories