aboutsummaryrefslogtreecommitdiff
path: root/tests/gotext.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-14 07:29:32 -0300
committerEuAndreh <eu@euandre.org>2025-05-14 07:29:38 -0300
commit8622b20d43455b1cf06b7072aad032e3bba67bc4 (patch)
treed99b30c49a3c2f595cbe2955989c622a6baaa3e6 /tests/gotext.go
parentrm LICENSE .travis.yml (diff)
downloadgotext-8622b20d43455b1cf06b7072aad032e3bba67bc4.tar.gz
gotext-8622b20d43455b1cf06b7072aad032e3bba67bc4.tar.xz
src/gotext.go: Do away with most of the CLI options
Diffstat (limited to 'tests/gotext.go')
-rw-r--r--tests/gotext.go52
1 files changed, 1 insertions, 51 deletions
diff --git a/tests/gotext.go b/tests/gotext.go
index e679bda..3c097c8 100644
--- a/tests/gotext.go
+++ b/tests/gotext.go
@@ -98,7 +98,6 @@ func test_processFiles() {
g.Testing("process files with concat", func() {
msgIDs = nil
- opts.NoLocation = true
fname := src(g.Heredoc(`
package main
@@ -108,7 +107,6 @@ func test_processFiles() {
}
`))
g.TErrorIf(processFiles([]string{fname}))
- opts.NoLocation = false
g.TAssertEqual(msgIDs, map[string][]msgID{
"foo\\nbar\\nbaz": []msgID{
@@ -263,10 +261,8 @@ func test_writePotFile() {
},
}
- opts.NoLocation = true
out := bytes.NewBuffer([]byte(""))
writePotFile(out)
- opts.NoLocation = false
expected := g.Heredoc(`
#, fuzzy
@@ -277,6 +273,7 @@ func test_writePotFile() {
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+ #: fname:2
msgid "foo"
msgstr ""
@@ -349,53 +346,6 @@ func test_writePotFile() {
g.TAssertEqual(out.String(), expected)
})
- g.Testing("sorted output", func() {
- msgIDs = map[string][]msgID{
- "aaa": []msgID{
- {
- fname: "fname",
- line: 2,
- },
- },
- "zzz": []msgID{
- {
- fname: "fname",
- line: 2,
- },
- },
- }
-
- opts.SortOutput = true
- // we need to run this a bunch of times as the ordering might
- // be right by pure chance
- // FIXME
- for i := 0; i < 10; i++ {
- out := bytes.NewBuffer([]byte(""))
- writePotFile(out)
-
- expected := g.Heredoc(`
- #, fuzzy
- msgid ""
- msgstr ""
- "Language: \n"
- "MIME-Version: 1.0\n"
- "Content-Type: text/plain; charset=UTF-8\n"
- "Content-Transfer-Encoding: 8bit\n"
-
- #: fname:2
- msgid "aaa"
- msgstr ""
-
- #: fname:2
- msgid "zzz"
- msgstr ""
-
- `)
- g.TAssertEqual(out.String(), expected)
- }
- opts.SortOutput = false
- })
-
g.Testing("multiline output", func() {
msgIDs = map[string][]msgID{
"foo\\nbar\\nbaz": []msgID{