[PATCH 18/20] t5306-pack-nobase: modernize test format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: John Cai <johncai86@xxxxxxxxx>

Some tests still use the old format with four spaces indentation.
Standardize the tests to the new format with tab indentation.

Signed-off-by: John Cai <johncai86@xxxxxxxxx>
---
 t/t5306-pack-nobase.sh | 94 ++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 49 deletions(-)

diff --git a/t/t5306-pack-nobase.sh b/t/t5306-pack-nobase.sh
index 846c5ca7d34..0d50c6b4bca 100755
--- a/t/t5306-pack-nobase.sh
+++ b/t/t5306-pack-nobase.sh
@@ -12,18 +12,17 @@ TEST_PASSES_SANITIZE_LEAK=true
 
 # Create A-B chain
 #
-test_expect_success \
-    'setup base' \
-    'test_write_lines a b c d e f g h i >text &&
-     echo side >side &&
-     git update-index --add text side &&
-     A=$(echo A | git commit-tree $(git write-tree)) &&
+test_expect_success 'setup base' '
+	test_write_lines a b c d e f g h i >text &&
+	echo side >side &&
+	git update-index --add text side &&
+	A=$(echo A | git commit-tree $(git write-tree)) &&
 
-     echo m >>text &&
-     git update-index text &&
-     B=$(echo B | git commit-tree $(git write-tree) -p $A) &&
-     git update-ref HEAD $B
-    '
+	echo m >>text &&
+	git update-index text &&
+	B=$(echo B | git commit-tree $(git write-tree) -p $A) &&
+	git update-ref HEAD $B
+'
 
 # Create repository with C whose parent is B.
 # Repository contains C, C^{tree}, C:text, B, B^{tree}.
@@ -31,52 +30,49 @@ test_expect_success \
 # Repository is missing A (parent of B).
 # Repository is missing A:side.
 #
-test_expect_success \
-    'setup patch_clone' \
-    'base_objects=$(pwd)/.git/objects &&
-     (mkdir patch_clone &&
-      cd patch_clone &&
-      git init &&
-      echo "$base_objects" >.git/objects/info/alternates &&
-      echo q >>text &&
-      git read-tree $B &&
-      git update-index text &&
-      git update-ref HEAD $(echo C | git commit-tree $(git write-tree) -p $B) &&
-      rm .git/objects/info/alternates &&
+test_expect_success 'setup patch_clone' '
+	base_objects=$(pwd)/.git/objects &&
+	(mkdir patch_clone &&
+	cd patch_clone &&
+	git init &&
+	echo "$base_objects" >.git/objects/info/alternates &&
+	echo q >>text &&
+	git read-tree $B &&
+	git update-index text &&
+	git update-ref HEAD $(echo C | git commit-tree $(git write-tree) -p $B) &&
+	rm .git/objects/info/alternates &&
 
-      git --git-dir=../.git cat-file commit $B |
-      git hash-object -t commit -w --stdin &&
+	git --git-dir=../.git cat-file commit $B |
+	git hash-object -t commit -w --stdin &&
 
-      git --git-dir=../.git cat-file tree "$B^{tree}" |
-      git hash-object -t tree -w --stdin
-     ) &&
-     C=$(git --git-dir=patch_clone/.git rev-parse HEAD)
-    '
+	git --git-dir=../.git cat-file tree "$B^{tree}" |
+	git hash-object -t tree -w --stdin
+	) &&
+	C=$(git --git-dir=patch_clone/.git rev-parse HEAD)
+'
 
 # Clone patch_clone indirectly by cloning base and fetching.
 #
-test_expect_success \
-    'indirectly clone patch_clone' \
-    '(mkdir user_clone &&
-      cd user_clone &&
-      git init &&
-      git pull ../.git &&
-      test $(git rev-parse HEAD) = $B &&
+test_expect_success 'indirectly clone patch_clone' '
+	(mkdir user_clone &&
+	 cd user_clone &&
+	 git init &&
+	 git pull ../.git &&
+	 test $(git rev-parse HEAD) = $B &&
 
-      git pull ../patch_clone/.git &&
-      test $(git rev-parse HEAD) = $C
-     )
-    '
+	 git pull ../patch_clone/.git &&
+	 test $(git rev-parse HEAD) = $C
+	)
+'
 
 # Cloning the patch_clone directly should fail.
 #
-test_expect_success \
-    'clone of patch_clone is incomplete' \
-    '(mkdir user_direct &&
-      cd user_direct &&
-      git init &&
-      test_must_fail git fetch ../patch_clone/.git
-     )
-    '
+test_expect_success 'clone of patch_clone is incomplete' '
+	(mkdir user_direct &&
+	 cd user_direct &&
+	 git init &&
+	 test_must_fail git fetch ../patch_clone/.git
+	)
+'
 
 test_done
-- 
gitgitgadget




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux