2012-09-25 19:37:54 -05:00
|
|
|
Literate CoffeeScript Test
|
|
|
|
--------------------------
|
|
|
|
|
2012-09-25 19:35:02 -05:00
|
|
|
comment comment
|
|
|
|
|
|
|
|
test "basic literate CoffeeScript parsing", ->
|
|
|
|
ok yes
|
|
|
|
|
|
|
|
now with a...
|
|
|
|
|
|
|
|
test "broken up indentation", ->
|
|
|
|
|
|
|
|
... broken up ...
|
|
|
|
|
|
|
|
do ->
|
|
|
|
|
|
|
|
... nested block.
|
|
|
|
|
|
|
|
ok yes
|
2013-03-15 03:23:09 +01:00
|
|
|
|
|
|
|
Code must be separated from text by a blank line.
|
|
|
|
|
|
|
|
test "code blocks must be preceded by a blank line", ->
|
|
|
|
|
|
|
|
The next line is part of the text and will not be executed.
|
|
|
|
fail()
|
|
|
|
|
|
|
|
ok yes
|
2012-09-25 19:35:02 -05:00
|
|
|
|
|
|
|
Code in `backticks is not parsed` and...
|
|
|
|
|
|
|
|
test "comments in indented blocks work", ->
|
|
|
|
do ->
|
|
|
|
do ->
|
|
|
|
# Regular comment.
|
|
|
|
|
|
|
|
###
|
|
|
|
Block comment.
|
|
|
|
###
|
|
|
|
|
2012-09-25 19:37:54 -05:00
|
|
|
ok yes
|
|
|
|
|
|
|
|
Regular [Markdown](http://example.com/markdown) features, like links
|
|
|
|
and unordered lists, are fine:
|
|
|
|
|
|
|
|
* I
|
|
|
|
|
|
|
|
* Am
|
|
|
|
|
|
|
|
* A
|
|
|
|
|
2013-01-10 06:23:14 +09:00
|
|
|
* List
|
|
|
|
|
|
|
|
Tabs work too:
|
|
|
|
|
2013-05-15 10:30:20 +01:00
|
|
|
test "tabbed code", ->
|
|
|
|
ok yes
|