Permalink
Browse files

Fix unit test, account for newly returned whitespace. Issue #335

  • Loading branch information...
1 parent 4f15fc9 commit 12f7e2e1f20aa3e750e72c1c9c7b8c9d73f9c796 @mworrell mworrell committed May 24, 2012
Showing with 15 additions and 4 deletions.
  1. +15 −4 deps/mochiweb/src/mochiweb_html.erl
@@ -936,39 +936,50 @@ parse_test() ->
</html>">>,
?assertEqual(
{<<"html">>, [],
- [{<<"head">>, [],
- [{<<"meta">>,
+ [<<"\n ">>,
+ {<<"head">>, [],
+ [<<"\n ">>,
+ {<<"meta">>,
[{<<"http-equiv">>,<<"Content-Type">>},
{<<"content">>,<<"text/html; charset=UTF-8">>}],
[]},
+ <<"\n ">>,
{<<"title">>,[],[<<"Foo">>]},
+ <<"\n ">>,
{<<"link">>,
[{<<"rel">>,<<"stylesheet">>},
{<<"type">>,<<"text/css">>},
{<<"href">>,<<"/static/rel/dojo/resources/dojo.css">>},
{<<"media">>,<<"screen">>}],
[]},
+ <<"\n ">>,
{<<"link">>,
[{<<"rel">>,<<"stylesheet">>},
{<<"type">>,<<"text/css">>},
{<<"href">>,<<"/static/foo.css">>},
{<<"media">>,<<"screen">>}],
[]},
+ <<"\n ">>,
{comment,<<"[if lt IE 7]>\n <style type=\"text/css\">\n .no_ie { display: none; }\n </style>\n <![endif]">>},
+ <<"\n ">>,
{<<"link">>,
[{<<"rel">>,<<"icon">>},
{<<"href">>,<<"/static/images/favicon.ico">>},
{<<"type">>,<<"image/x-icon">>}],
[]},
+ <<"\n ">>,
{<<"link">>,
[{<<"rel">>,<<"shortcut icon">>},
{<<"href">>,<<"/static/images/favicon.ico">>},
{<<"type">>,<<"image/x-icon">>}],
- []}]},
+ []},
+ <<"\n ">>]},
+ <<"\n ">>,
{<<"body">>,
[{<<"id">>,<<"home">>},
{<<"class">>,<<"tundra">>}],
- [<<"&lt;<this<!-- is -->CDATA>&gt;">>]}]},
+ [<<"&lt;<this<!-- is -->CDATA>&gt;">>]},
+ <<"\n">>]},
parse(D0)),
?assertEqual(
{<<"html">>,[],

0 comments on commit 12f7e2e

Please sign in to comment.