Skip to content

Commit

Permalink
Added some passing macro definition parsing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
btheado committed Dec 24, 2023
1 parent 907aed3 commit 90b3652
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
16 changes: 16 additions & 0 deletions editions/test/tiddlers/tests/data/macros/EndInBody.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Macros/EndInBody
description: \end line starting with non-whitespace is part of macro body
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]

title: Output

\define hello()
hello \end
\end

Out: <<hello>>
+
title: ExpectedResult

<p>Out: hello \end</p>
16 changes: 16 additions & 0 deletions editions/test/tiddlers/tests/data/macros/IndentedEnd.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Macros/IndentedEnd
description: \end line starting with whitespace ends a macro body
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]

title: Output

\define hello()
hello \end
\end

Out: <<hello>>
+
title: ExpectedResult

<p>Out: hello \end</p>
16 changes: 16 additions & 0 deletions editions/test/tiddlers/tests/data/macros/MismatchedNamedEnd.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Macros/MismatchedNamedEnd
description: Mismatched named end is part of the body
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]

title: Output

\define hello()
\end goodbye
\end

Out: <<hello>>
+
title: ExpectedResult

<p>Out: \end goodbye</p>

0 comments on commit 90b3652

Please sign in to comment.