aboutsummaryrefslogtreecommitdiff
path: root/tests/gotext.go
diff options
context:
space:
mode:
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{