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

[PATCH] t7406: fix i18n expectation of error message

From
Stefan Beller <sbeller@google.com>
Date
May 5, 2017, 17:38 UTC
Message-ID
<20170505173841.20555-1-sbeller@google.com>
In-Reply-To
<20170505154053.58128-1-larsxschneider@gmail.com>

The error message from "submodule update" is internationalized, which makes sense. The test however did not check for the translated version, but used a hardcoded string, which breaks the test when run with GETTEXT_POISON.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 t/t7406-submodule-update.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 4ac386d98b..12f6435ab0 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -441,13 +441,11 @@ test_expect_success 'submodule update - command in .git/config catches failure -
 	test_i18ncmp actual expect
 '
 
+sq="'"
 test_expect_success 'submodule update - command run for initial population of submodule' '
-	cat >expect <<-EOF &&
-	Execution of '\''false $submodulesha1'\'' failed in submodule path '\''submodule'\''
-	EOF
 	rm -rf super/submodule &&
 	test_must_fail git -C super submodule update 2>actual &&
-	test_cmp expect actual &&
+	test_i18ngrep "Execution of ${sq}false $submodulesha1${sq} failed in submodule path ${sq}submodule${sq}" actual &&
 	git -C super submodule update --checkout
 '
 
-- 
2.13.0.rc2.dirty
Previous: Jonathan NiederNext: Ævar Arnfjörð Bjarmason
Message 6 of 11 in “run GETTEXT_POISON on TravisCI”
  1. 0/2 run GETTEXT_POISON on TravisCILars Schneider, May 5, 2017
  2. 1/2 travis-ci: setup "prove cache" in "script" stepLars Schneider, May 5, 2017
  3. Ævar Arnfjörð BjarmasonMay 5, 2017
  4. 2/2 travis-ci: add job to run tests with GETTEXT_POISONLars Schneider, May 5, 2017
  5. Jonathan NiederMay 5, 2017
  6. t7406: fix i18n expectation of error messageStefan Beller, May 5, 2017
  7. Ævar Arnfjörð BjarmasonMay 5, 2017
  8. Stefan BellerMay 5, 2017
  9. Johannes SixtMay 5, 2017
  10. tests: fix tests broken under GETTEXT_POISON=YesPleaseÆvar Arnfjörð Bjarmason, May 5, 2017
  11. Junio C HamanoMay 8, 2017

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.