Thread (32 messages) 32 messages, 5 authors, 2017-02-14

Re: [PATCH v3 3/5] stash: add test for the create command line arguments

flat view

From: Thomas Gummerer <hidden>
Date: 2017-02-11 13:55:23

On 02/06, Jeff King wrote:
On Sun, Feb 05, 2017 at 08:26:40PM +0000, Thomas Gummerer wrote:
quoted
+test_expect_success 'create stores correct message' '
+	>foo &&
+	git add foo &&
+	STASH_ID=$(git stash create "create test message") &&
+	echo "On master: create test message" >expect &&
+	git show --pretty=%s ${STASH_ID} | head -n1 >actual &&
+	test_cmp expect actual
+'
This misses failure exit codes from "git show" because it's on the left
side of a pipe. Perhaps "git show -s" or "git log -1" would get you the
same output without needing "head" (and saving a process and the time
spent generating the diff, as a bonus).

Ditto in the other tests from this patch and later ones.
Good catch, will fix.
-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help