summaryrefslogtreecommitdiff
path: root/gemini/gemtext/sub_test.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-08-26 09:22:03 -0600
committertjpcc <tjp@ctrl-c.club>2023-08-26 09:26:23 -0600
commit343cdecabd46e2b505f3f92c8281753df1ee0fee (patch)
treeaa9cd52017e3d044f8ffe9e68fdcae0f21c9fdec /gemini/gemtext/sub_test.go
parent4b42fce53b80c8eb1796c4fb4c3966fb4c759677 (diff)
GmisubToAtom: output result to any io.Writer rather than return a string
Diffstat (limited to 'gemini/gemtext/sub_test.go')
-rw-r--r--gemini/gemtext/sub_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/gemini/gemtext/sub_test.go b/gemini/gemtext/sub_test.go
index 26f98ed..f080705 100644
--- a/gemini/gemtext/sub_test.go
+++ b/gemini/gemtext/sub_test.go
@@ -51,8 +51,11 @@ func TestGemsubToAtom(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- xml := GmisubToAtom(doc, *loc)
- if xml != test.output {
+ out := &bytes.Buffer{}
+ if err := GmisubToAtom(doc, *loc, out); err != nil {
+ t.Fatal(err)
+ }
+ if out.String() != test.output {
t.Fatal("mismatched output")
}
})