unit test for linebreaks
Russ Ross russ@russross.com
Wed, 01 Jun 2011 18:52:55 -0600
1 files changed,
16 insertions(+),
2 deletions(-)
jump to
M
inline_test.go
→
inline_test.go
@@ -234,8 +234,8 @@
"`source code` and a `stray\n", "<p><code>source code</code> and a `stray</p>\n", - "`source with _awkward characters_ in it`\n", - "<p><code>source with _awkward characters_ in it</code></p>\n", + "`source *with* _awkward characters_ in it`\n", + "<p><code>source *with* _awkward characters_ in it</code></p>\n", "`split over\ntwo lines`\n", "<p><code>split over\ntwo lines</code></p>\n",@@ -248,3 +248,17 @@ "<p><code>multiple ticks `with` ticks inside</code></p>\n",
} doTests(t, tests) } + +func TestLineBreak(t *testing.T) { + var tests = []string{ + "this line \nhas a break\n", + "<p>this line<br />\nhas a break</p>\n", + + "this line \ndoes not\n", + "<p>this line \ndoes not</p>\n", + + "this has an \nextra space\n", + "<p>this has an<br />\nextra space</p>\n", + } + doTests(t, tests) +}