Re: [PATCH] rebase -x: do not die without -i

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

 



Am 17.03.2016 um 02:19 schrieb Stefan Beller:
-test_expect_success 'rebase --exec without -i shows error message' '
+test_expect_success 'rebase --exec works without -i ' '
  	git reset --hard execute &&
-	set_fake_editor &&
-	test_must_fail git rebase --exec "git show HEAD" HEAD~2 2>actual &&
-	echo "The --exec option must be used with the --interactive option" >expected &&
-	test_i18ncmp expected actual
+	git rebase --exec true HEAD~2 2>actual2 >actual1 &&
+	echo "Successfully rebased and updated refs/heads/autosquash_expected." >expected &&
+	test_i18ncmp expected actual2 &&
+	test_line_count = 2 actual1

We don't have an explicit guideline, but please do not check stderr output using test_cmp or test_i18ncmp. The reason is that some shells write trace output to stderr when run under 'set -x'. That is, when you run this test as

     ./t3404-rebase-interactive.sh -x -v

it will fail because there is now more text in actual2 than expected. We have a number of cases like this elsewhere, but we should not stack new cases on the pile.

Please use test_i18ngrep:

	test_i18ngrep "Successfully rebased and updated" actual2 &&
	test_line_count = 2 actual1

-- Hannes

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