From 5dc7c74e9bd6e7bb274eac5c5a3221459bbaca85 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 8 Nov 2010 18:00:27 -0800 Subject: [PATCH] failing tests --- examples/two_sections.html | 7 +++++++ examples/two_sections.js | 1 + examples/two_sections.txt | 3 +++ test/mustache_spec.rb | 19 +++++++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 examples/two_sections.html create mode 100644 examples/two_sections.js create mode 100644 examples/two_sections.txt diff --git a/examples/two_sections.html b/examples/two_sections.html new file mode 100644 index 0000000..cc54add --- /dev/null +++ b/examples/two_sections.html @@ -0,0 +1,7 @@ +{{#show_following}} + +{{/show_following}} +{{#show_following}} + +{{/show_following}} + diff --git a/examples/two_sections.js b/examples/two_sections.js new file mode 100644 index 0000000..8546f64 --- /dev/null +++ b/examples/two_sections.js @@ -0,0 +1 @@ +var two_sections = {}; \ No newline at end of file diff --git a/examples/two_sections.txt b/examples/two_sections.txt new file mode 100644 index 0000000..c634376 --- /dev/null +++ b/examples/two_sections.txt @@ -0,0 +1,3 @@ + BAR bar + BAR bar + BAR bar diff --git a/test/mustache_spec.rb b/test/mustache_spec.rb index a49603d..6656703 100644 --- a/test/mustache_spec.rb +++ b/test/mustache_spec.rb @@ -92,6 +92,25 @@ describe "mustache" do run_js(js).strip.should == "foo BAR" end + it "should not suck" do + js = <<-JS + try{ + #{@boilerplate} + + print(Mustache.to_html("{{#foo}}\\ +{{/foo}}\\ +{{#bar}}\\ +{{/bar}}\\ +", {})); + } catch(e) { + print(e); + } + JS + + run_js(js).should == "foanfs" + end + + non_partials.each do |testname| describe testname do it "should generate the correct html" do