Skip to content

Commit

Permalink
Fix unit tests for Diet text blocks with proper unindentation. See #614.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Apr 21, 2014
1 parent 80681ea commit 4548765
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/vibe/templ/diet.d
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void compileDietString(string diet_code, ALIASES...)(OutputStream stream__)
// Generate the D source code for the diet template
//pragma(msg, dietParser!template_file());
mixin(dietStringParser!diet_code(0));
#line 152 "source/vibe/templ/diet.d"
#line 153 "source/vibe/templ/diet.d"
}


Expand Down Expand Up @@ -1271,11 +1271,11 @@ unittest {

// issue 510
assert(compile!("pre.test\n\tfoo") == "<pre class=\"test\">\n\t<foo></foo></pre>");
assert(compile!("pre.test.\n\tfoo") == "<pre class=\"test\">\n\tfoo</pre>");
assert(compile!("pre.test.\n\tfoo") == "<pre class=\"test\">\nfoo</pre>");
assert(compile!("pre.test. foo") == "<pre class=\"test\"></pre>");
assert(compile!("pre().\n\tfoo") == "<pre>\n\tfoo</pre>");
assert(compile!("pre().\n\tfoo") == "<pre>\nfoo</pre>");
assert(compile!("pre#foo.test(data-img=\"sth\",class=\"meh\"). something\n\tmeh") ==
"<pre id=\"foo\" data-img=\"sth\" class=\"meh test\">\n\tmeh</pre>");
"<pre id=\"foo\" data-img=\"sth\" class=\"meh test\">\nmeh</pre>");
}


Expand Down

0 comments on commit 4548765

Please sign in to comment.