all repos — grayfriday @ 1e40ebaf472ae0587bc0c5efb72a807279df4e12

blackfriday fork with a few changes

unit test for linebreaks
Russ Ross russ@russross.com
Wed, 01 Jun 2011 18:52:55 -0600
commit

1e40ebaf472ae0587bc0c5efb72a807279df4e12

parent

4b850e809858ee051a99b751e637657f2ee9f26f

1 files changed, 16 insertions(+), 2 deletions(-)

jump to
M inline_test.goinline_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) +}