From 1e40ebaf472ae0587bc0c5efb72a807279df4e12 Mon Sep 17 00:00:00 2001 From: Russ Ross Date: Wed, 1 Jun 2011 18:52:55 -0600 Subject: [PATCH] unit test for linebreaks --- inline_test.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/inline_test.go b/inline_test.go index 7d8e4cc..42088d4 100644 --- a/inline_test.go +++ b/inline_test.go @@ -234,8 +234,8 @@ func TestCodeSpan(t *testing.T) { "`source code` and a `stray\n", "

source code and a `stray

\n", - "`source with _awkward characters_ in it`\n", - "

source with _awkward characters_ in it

\n", + "`source *with* _awkward characters_ in it`\n", + "

source *with* _awkward characters_ in it

\n", "`split over\ntwo lines`\n", "

split over\ntwo lines

\n", @@ -248,3 +248,17 @@ func TestCodeSpan(t *testing.T) { } doTests(t, tests) } + +func TestLineBreak(t *testing.T) { + var tests = []string{ + "this line \nhas a break\n", + "

this line
\nhas a break

\n", + + "this line \ndoes not\n", + "

this line \ndoes not

\n", + + "this has an \nextra space\n", + "

this has an
\nextra space

\n", + } + doTests(t, tests) +}