]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:tests: Reformat test_smb2_not_casesensitive.sh
authorAndreas Schneider <asn@samba.org>
Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 10 Jun 2022 13:53:37 +0000 (13:53 +0000)
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/script/tests/test_smb2_not_casesensitive.sh

index a643ae7e6bac75451f919c1db5d2594bf54a5534..7e85834d9328351807deb90cc4e1d0381bd5cb44 100755 (executable)
@@ -4,10 +4,10 @@
 #
 
 if [ $# -lt 6 ]; then
-cat <<EOF
+       cat <<EOF
 Usage: test_smb2_not_casesensitive SERVER SERVER_IP USERNAME PASSWORD LOCAL_PATH SMBCLIENT
 EOF
-exit 1;
+       exit 1
 fi
 
 SERVER=${1}
@@ -17,7 +17,7 @@ PASSWORD=${4}
 LOCAL_PATH=${5}
 SMBCLIENT=${6}
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 failed=0
@@ -26,10 +26,10 @@ failed=0
 test_access_with_different_case()
 {
        tmpfile=$LOCAL_PATH/testfile.txt
-       echo "foobar" > $tmpfile
+       echo "foobar" >$tmpfile
 
        cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT -mSMB3 -U$USERNAME%$PASSWORD "$SERVER" -I $SERVER_IP -c "ls TeStFiLe.TxT" 2>&1'
-       out=`eval $cmd`
+       out=$(eval $cmd)
        ret=$?
 
        rm -f $tmpfile
@@ -47,14 +47,14 @@ test_access_with_different_case()
 # different case
 test_rename()
 {
-set -x
+       set -x
        tmpfile=$LOCAL_PATH/torename.txt
-       echo "foobar" > $tmpfile
+       echo "foobar" >$tmpfile
        targetfile=$LOCAL_PATH/target.txt
        touch $targetfile
 
        cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT -mSMB3 -U$USERNAME%$PASSWORD "$SERVER" -I $SERVER_IP -c "rename ToReNaMe.TxT TaRgEt.txt" 2>&1'
-       out=`eval $cmd`
+       out=$(eval $cmd)
        ret=$?
 
        rm -f $tmpfile
@@ -70,13 +70,12 @@ set -x
        fi
 }
 
-
 testit "accessing a file with different case succeeds" \
-       test_access_with_different_case || \
-       failed=`expr $failed + 1`
+       test_access_with_different_case ||
+       failed=$(expr $failed + 1)
 
 testit "renaming a file with different case succeeds" \
-       test_rename || \
-       failed=`expr $failed + 1`
+       test_rename ||
+       failed=$(expr $failed + 1)
 
 exit $failed