Skip to content

Commit

Permalink
Added some basic tests for definition lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
evilstreak committed Mar 26, 2010
1 parent f8cc334 commit 9a070e5
Show file tree
Hide file tree
Showing 11 changed files with 147 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/features.t.js
Expand Up @@ -68,7 +68,7 @@ if ( require.main === module ) {
];

dialects.Maruku = dialects.Gruber.slice( 0 );
dialects.Maruku.push( "meta" );
dialects.Maruku.push( "meta", "definition_lists" );

// TODO if dialects/features were passed on the command line, filter to them
// if ( args.length ) {
Expand Down
22 changes: 22 additions & 0 deletions test/features/definition_lists/inline.json
@@ -0,0 +1,22 @@
["html",
["dl",
["dt",
"a term"
],
["dd",
["em",
"emphasised"
],
" definition."
],
["dt",
"another term"
],
["dd",
["strong",
"strong"
],
" definition."
]
]
]
5 changes: 5 additions & 0 deletions test/features/definition_lists/inline.text
@@ -0,0 +1,5 @@
a term
: *emphasised* definition.

another term
: **strong** definition.
16 changes: 16 additions & 0 deletions test/features/definition_lists/long.json
@@ -0,0 +1,16 @@
["html",
["dl",
["dt",
"first term"
],
["dd",
"the quick brown fox jumps\nover the lazy dog"
],
["dt",
"second term"
],
["dd",
"pack my box with five\ndozen liquor jugs"
]
]
]
7 changes: 7 additions & 0 deletions test/features/definition_lists/long.text
@@ -0,0 +1,7 @@
first term
: the quick brown fox jumps
over the lazy dog

second term
: pack my box with five
dozen liquor jugs
28 changes: 28 additions & 0 deletions test/features/definition_lists/multiple_definitions.json
@@ -0,0 +1,28 @@
["html",
["dl",
["dt",
"fruit"
],
["dd",
"apple"
],
["dd",
"banana"
],
["dd",
"pear"
],
["dt",
"animal"
],
["dd",
"cow"
],
["dd",
"duck"
],
["dd",
"horse"
]
]
]
9 changes: 9 additions & 0 deletions test/features/definition_lists/multiple_definitions.text
@@ -0,0 +1,9 @@
fruit
: apple
: banana
: pear

animal
: cow
: duck
: horse
22 changes: 22 additions & 0 deletions test/features/definition_lists/multiple_terms.json
@@ -0,0 +1,22 @@
["html",
["dl",
["dt",
"fruit"
],
["dt",
"vegetable"
],
["dd",
"tomato"
],
["dt",
"animal"
],
["dt",
"mineral"
],
["dd",
"pet rock"
]
]
]
7 changes: 7 additions & 0 deletions test/features/definition_lists/multiple_terms.text
@@ -0,0 +1,7 @@
fruit
vegetable
: tomato

animal
mineral
: pet rock
22 changes: 22 additions & 0 deletions test/features/definition_lists/tight.json
@@ -0,0 +1,22 @@
["html",
["dl",
["dt",
"one"
],
["dd",
"alpha"
],
["dt",
"two"
],
["dd",
"beta"
],
["dt",
"three"
],
["dd",
"gamma"
]
]
]
8 changes: 8 additions & 0 deletions test/features/definition_lists/tight.text
@@ -0,0 +1,8 @@
one
: alpha

two
: beta

three
: gamma

0 comments on commit 9a070e5

Please sign in to comment.