From 72a90baa2d66daf0f98f406d268268d895f723a2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 23 Apr 2025 18:54:41 +0200 Subject: [PATCH] xgettext: Go: More unit tests. * gettext-tools/tests/xgettext-go-6: Add more test cases regarding string concatenation. --- gettext-tools/tests/xgettext-go-6 | 33 ++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/gettext-tools/tests/xgettext-go-6 b/gettext-tools/tests/xgettext-go-6 index 073d16f97..0d3121328 100755 --- a/gettext-tools/tests/xgettext-go-6 +++ b/gettext-tools/tests/xgettext-go-6 @@ -26,6 +26,21 @@ second line third line`)) // String literal concatenation fmt.Println(gotext.Get(`Test 4` + "711")) + fmt.Println( + // a + gotext.Get("Test 5" + " part2")) + fmt.Println(gotext.Get( + // a + "Test 6" + " part2")) + fmt.Println( // a + gotext // b + . // c + Get // d + ( // e + "Test 7" // f + + // g + " part2" + )); // Empty string fmt.Println(gotext.Get("")) } @@ -44,7 +59,7 @@ cat <<\EOF > xg-go-6.ok # FIRST AUTHOR , YEAR. # #. Empty string -#: xg-go-6.go:24 +#: xg-go-6.go:39 #, fuzzy msgid "" msgstr "" @@ -84,6 +99,22 @@ msgstr "" #: xg-go-6.go:22 msgid "Test 4711" msgstr "" + +#. a +#: xg-go-6.go:25 +msgid "Test 5 part2" +msgstr "" + +#. a +#: xg-go-6.go:28 +msgid "Test 6 part2" +msgstr "" + +#. d +#. e +#: xg-go-6.go:34 +msgid "Test 7 part2" +msgstr "" EOF : ${DIFF=diff} -- 2.47.3