[PATCH 7/9] t3904: adjust stash -p test to account for index states with breaking changes

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

 



Signed-off-by: D. Ben Knoble <ben.knoble+github@xxxxxxxxx>
---
 t/t3904-stash-patch.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/t/t3904-stash-patch.sh b/t/t3904-stash-patch.sh
index ae313e3c70..90f6b6bc90 100755
--- a/t/t3904-stash-patch.sh
+++ b/t/t3904-stash-patch.sh
@@ -30,7 +30,7 @@
 	verify_state dir/foo work index
 '
 
-test_expect_success 'git stash -p' '
+test_expect_success !WITH_BREAKING_CHANGES 'git stash -p' '
 	test_write_lines y n y | git stash save -p &&
 	verify_state HEAD committed HEADfile_index &&
 	verify_saved_state bar &&
@@ -42,6 +42,18 @@
 	verify_state dir/foo work head
 '
 
+test_expect_success WITH_BREAKING_CHANGES 'git stash -p' '
+	test_write_lines y n y | git stash save -p &&
+	verify_state HEAD committed HEADfile_index &&
+	verify_saved_state bar &&
+	verify_state dir/foo head index &&
+	git reset --hard &&
+	git stash apply &&
+	verify_state HEAD HEADfile_work HEADfile_index &&
+	verify_state bar dummy bar_index &&
+	verify_state dir/foo work index
+'
+
 test_expect_success 'git stash -p --no-keep-index' '
 	set_state HEAD HEADfile_work HEADfile_index &&
 	set_state bar bar_work bar_index &&
-- 
2.48.1





[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