From cb658cd24f06849ea8ad7d6c8eb1d26c19a7a525 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Wed, 15 Aug 2018 16:06:25 +0200 Subject: [PATCH] Mark tests: remove whitespace hack Doesn't add anything and actually created testcases that were wrong. Signed-off-by: Miek Gieben --- mmark_test.go | 6 ------ testdata/mmark.test | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/mmark_test.go b/mmark_test.go index 54f4551..27e935a 100644 --- a/mmark_test.go +++ b/mmark_test.go @@ -31,12 +31,6 @@ func TestMmark(t *testing.T) { got := ToHTML([]byte(input), p, nil) - // make whitespace more visible - got = bytes.Replace(got, []byte(" "), []byte("_"), -1) - want = bytes.Replace(want, []byte(" "), []byte("_"), -1) - got = bytes.Replace(got, []byte("\n"), []byte("_\n"), -1) - want = bytes.Replace(want, []byte("\n"), []byte("_\n"), -1) - if bytes.Compare(got, want) != 0 { t.Errorf("want (%d bytes) %s, got (%d bytes) %s, for input %q", len(want), want, len(got), got, input) } diff --git a/testdata/mmark.test b/testdata/mmark.test index 59bbe7c..762cd05 100644 --- a/testdata/mmark.test +++ b/testdata/mmark.test @@ -24,9 +24,9 @@ println("hi") Caption: This *is* a caption. --- -

Test_Code_Captions

+

Test Code Captions

-
println("hi")
+
println("hi")
 
This is a caption.
@@ -54,7 +54,7 @@ Caption: Shakespeare. # Test Citations [@RFC1034] --- -

Test_Citations

+

Test Citations

[RFC1034]

---