]> git.ipfire.org Git - thirdparty/git.git/commitdiff
test: trivial cleanups
authorFelipe Contreras <felipe.contreras@gmail.com>
Tue, 28 May 2013 12:54:29 +0000 (07:54 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 16:03:14 +0000 (09:03 -0700)
No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3403-rebase-skip.sh
t/t3505-cherry-pick-empty.sh

index 826500bd18a520a37e3490b9deeca94fb9e14405..3968020e648091e907fde6efe9aeb5ce66753670 100755 (executable)
@@ -64,10 +64,11 @@ test_expect_success 'rebase with --merge' '
 
 test_expect_success 'rebase --skip with --merge' '
        git rebase --skip
-       '
+'
 
-test_expect_success 'merge and reference trees equal' \
-       'test -z "`git diff-tree skip-merge skip-reference`"'
+test_expect_success 'merge and reference trees equal' '
+       test -z "`git diff-tree skip-merge skip-reference`"
+'
 
 test_expect_success 'moved back to branch correctly' '
        test refs/heads/skip-merge = $(git symbolic-ref HEAD)
index a0c6e30d805e6e71b9fec4311a6ede298b6265b4..fbdc47cfbdae6e3cec7d6762faa4a8e13554d803 100755 (executable)
@@ -28,29 +28,21 @@ test_expect_success setup '
 '
 
 test_expect_success 'cherry-pick an empty commit' '
-       git checkout master && {
-               git cherry-pick empty-branch^
-               test "$?" = 1
-       }
+       git checkout master &&
+       test_expect_code 1 git cherry-pick empty-branch^
 '
 
 test_expect_success 'index lockfile was removed' '
-
        test ! -f .git/index.lock
-
 '
 
 test_expect_success 'cherry-pick a commit with an empty message' '
-       git checkout master && {
-               git cherry-pick empty-branch
-               test "$?" = 1
-       }
+       git checkout master &&
+       test_expect_code 1 git cherry-pick empty-branch
 '
 
 test_expect_success 'index lockfile was removed' '
-
        test ! -f .git/index.lock
-
 '
 
 test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '
@@ -101,7 +93,7 @@ test_expect_success 'cherry-pick a no-op with --keep-redundant' '
        git reset --hard &&
        git checkout fork^0 &&
        git cherry-pick --keep-redundant-commits master &&
-       git show -s --format='%s' >actual &&
+       git show -s --format=%s >actual &&
        echo "add file2 on master" >expect &&
        test_cmp expect actual
 '