]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Go: More unit tests.
authorBruno Haible <bruno@clisp.org>
Wed, 23 Apr 2025 16:54:41 +0000 (18:54 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 23 Apr 2025 16:54:41 +0000 (18:54 +0200)
* gettext-tools/tests/xgettext-go-6: Add more test cases regarding string
concatenation.

gettext-tools/tests/xgettext-go-6

index 073d16f97d7dece2dcb8534e0dd207c4c715d6ef..0d31213285bbbba90c8096df6d519594d0c21c8c 100755 (executable)
@@ -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 <EMAIL@ADDRESS>, 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}