Skip to content

Commit

Permalink
failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
billymoon committed Mar 31, 2015
1 parent bd17cc9 commit bf1d9d3
Showing 1 changed file with 108 additions and 0 deletions.
108 changes: 108 additions & 0 deletions test/literate.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,111 @@ Tabs work too:

test "tabbed code", ->
ok yes
---

# keep track of whether code blocks are executed or not
executed = false
<p>

executed = true # should not execute, this is just HTML para, not code!

</p>

test "should ignore indented sections inside HTML", ->
eq executed, false
---

* A list item with a code block:
test "basic literate CoffeeScript parsing", ->
ok yes
---

* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
viverra nec, fringilla in, laoreet vitae, risus.
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse id sem consectetuer libero luctus adipiscing.
---

1. This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
sit amet velit.
2. Suspendisse id sem consectetuer libero luctus adipiscing.
---

1. This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
sit amet velit.
2. Suspendisse id sem consectetuer libero luctus adipiscing.
---

* A list item with a blockquote:
> This is a blockquote
> inside a list item.
---

This next one probably passes because a string is inoffensive in compiled js, also, can't get `marked` to parse it correctly, and not sure if empty line is permitted between title and reference

This is [an example][id] reference-style link.
[id]: http://example.com/

"Optional Title Here"
---

executed = no
1986. What a great season.
executed = yes
and test...

test "should recognise indented code blocks in lists", ->
ok executed
---

executed = no
1986. What a great season.
executed = yes
and test...

test "should recognise indented code blocks in lists with empty line as separator", ->
ok executed
---

executed = no
1986\. What a great season.
executed = yes

and test...

test "should ignore indented code in escaped list like number", ->
eq executed, no

0 comments on commit bf1d9d3

Please sign in to comment.