[PATCH] t3407: make reflog check stricter

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

 



---
This is hopefully an improvement to the test case. Please squash with
previous patch if you agree.

 t/t3407-rebase-abort.sh |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh
index f3250c3..e573dc8 100755
--- a/t/t3407-rebase-abort.sh
+++ b/t/t3407-rebase-abort.sh
@@ -77,11 +77,12 @@ testrebase() {
 		cd "$work_dir" &&
 		# Clean up the state from the previous one
 		git reset --hard pre-rebase &&
-		reflog_entries_before=$(git reflog show to-rebase | wc -l) &&
+		git reflog show to-rebase > reflog_before &&
 		test_must_fail git rebase$type master &&
 		git rebase --abort &&
-		reflog_entries_after=$(git reflog show to-rebase | wc -l) &&
-		test $reflog_entries_before -eq $reflog_entries_after
+		git reflog show to-rebase > reflog_after &&
+		test_cmp reflog_before reflog_after &&
+		rm reflog_before reflog_after
 	'
 }
 
-- 
1.7.3.2.190.gfb4ae

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]