git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] test: trivial cleanups

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 28, 2013, 12:54 UTC
Message-ID
<1369745671-22418-4-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1369745671-22418-1-git-send-email-felipe.contreras@gmail.com>
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 t/t3403-rebase-skip.sh       |  7 ++++---
 t/t3505-cherry-pick-empty.sh | 18 +++++-------------
 2 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 826500b..3968020 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -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)
diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh
index a0c6e30..fbdc47c 100755
--- a/t/t3505-cherry-pick-empty.sh
+++ b/t/t3505-cherry-pick-empty.sh
@@ -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
 '
-- 
1.8.3.rc3.312.g47657de
Previous: Felipe ContrerasNext: Felipe Contreras
Message 5 of 13 in “Trivial patches”
  1. 0/5 Trivial patchesFelipe Contreras, May 28, 2013
  2. 1/5 remote: trivial style cleanupFelipe Contreras, May 28, 2013
  3. Junio C HamanoMay 28, 2013
  4. 2/5 sequencer: trivial fixFelipe Contreras, May 28, 2013
  5. 3/5 test: trivial cleanupsFelipe Contreras, May 28, 2013
  6. 4/5 test: improve rebase -q testFelipe Contreras, May 28, 2013
  7. Junio C HamanoMay 28, 2013
  8. Jonathan NiederMay 28, 2013
  9. Junio C HamanoMay 28, 2013
  10. Felipe ContrerasMay 29, 2013
  11. Junio C HamanoMay 29, 2013
  12. Felipe ContrerasMay 29, 2013
  13. 5/5 test: rebase: fix --interactive testFelipe Contreras, May 28, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.