1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-22 21:58:20 +00:00

add some manual test tiddlers to verify parsers

This commit is contained in:
pmario 2024-02-17 04:33:29 +01:00
parent d33ee0bacb
commit efeefda602
35 changed files with 454 additions and 0 deletions

View File

@ -0,0 +1,16 @@
created: 20240216230908147
modified: 20240216231039038
tags:
title: Actions
type: text/vnd.tiddlywiki
\whitespace trim
<!-- Define the <$action.mywidget> widget by defining a transcludable variable with that name -->
\widget $action.mywidget(one:'Jaguar')
\whitespace trim
<$action-setfield $tiddler="Result" $field="text" $value=<<one>>/>
\end
<$action.mywidget one="Dingo">
Crocodile
</$action.mywidget>

View File

@ -0,0 +1,13 @@
created: 20240217002246152
modified: 20240217002337316
tags:
title: Conditionals/Else
type: text/vnd.tiddlywiki
<$let something="one">
{{Textx}}
</$let>
<$let something="two">
{{Textx}}
</$let>

View File

@ -0,0 +1,25 @@
created: 20240216235513510
modified: 20240217003120869
tags:
title: Conditionals/NestedElseif
type: text/vnd.tiddlywiki
<$let something="one" another="one">
{{Text}}
</$let>
<$let something="one" another="two">
{{Text}}
</$let>
<$let something="one" another="three">
{{Text}}
</$let>
<$let something="two">
{{Text}}
</$let>
<$let something="three">
{{Text}}
</$let>

View File

@ -0,0 +1,25 @@
created: 20240217004718488
modified: 20240217005648458
tags:
title: Genesis/Block-TODO
type: text/vnd.tiddlywiki
<$genesis $type="$reveal" type=nomatch>
Block
</$genesis>
<$genesis $type="$reveal" type=nomatch $mode=block>
Block forced block
</$genesis>
<$genesis $type="$reveal" type=nomatch $mode=inline>
Block forced inline
</$genesis>
<$genesis $type=$reveal type=nomatch>Inline</$genesis>
<$genesis $type=$reveal type=nomatch $mode=block>Inline forced block</$genesis>
<$genesis $type=$reveal type=nomatch $mode=inline>Inline forced inline</$genesis>

View File

@ -0,0 +1,9 @@
created: 20240217003121792
modified: 20240217003441872
tags:
title: Genesis/EmptyType-todo
type: text/vnd.tiddlywiki
<$genesis>Mouse</$genesis>
<$genesis $type="">Mouse</$genesis>

View File

@ -0,0 +1,22 @@
created: 20240216235121906
modified: 20240217000309225
tags:
title: ListWidget/WithExplicitTemplatesOverriddenByAttributes
type: text/vnd.tiddlywiki
\whitespace trim
\procedure test(filter)
<$list filter=<<filter>> emptyMessage="Zero" template="Template">
<$list-template>
<$text text=<<currentTiddler>>/>
</$list-template>
<$list-empty>
None!
</$list-empty>
</$list>
\end
<<test "1 2 3">>
<<test "">>

View File

@ -0,0 +1,24 @@
created: 20240217001636123
modified: 20240217002008520
tags:
title: ListWidget/WithJoinTemplateInBlockMode
type: text/vnd.tiddlywiki
\whitespace trim
\procedure test(filter)
<$list filter=<<filter>>>
Item:<<currentTiddler>>
<$list-empty>
None!
</$list-empty>
<$list-join><br></$list-join>
</$list>
\end
<<test "1 2 3">>
<<test "">>

View File

@ -0,0 +1,9 @@
created: 20240216233819175
modified: 20240216233827921
tags:
title: Macro
type: text/vnd.tiddlywiki
\define imported-print-this-tiddler()
<$text text=<<thisTiddler>>/>
\end

View File

@ -0,0 +1,8 @@
created: 20240216224314133
list: 1 3 4
modified: 20240216230619816
tags:
title: Numbers
type: text/vnd.tiddlywiki
<$list filter='[list[Numbers]]' variable='item' join=', '><<item>></$list>

View File

@ -0,0 +1,11 @@
created: 20240216234248448
modified: 20240216234310698
tags:
title: Procedures/EndInBody
type: text/vnd.tiddlywiki
\procedure hello()
hello \end
\end
Out: <<hello>>

View File

@ -0,0 +1,15 @@
created: 20240217011056204
modified: 20240217011324931
tags:
title: Procedures/Nested-TODO
type: text/vnd.tiddlywiki
\whitespace trim
\procedure alpha(x)
\procedure beta(y)
<$text text=<<y>>/>
\end beta
<$transclude $variable="beta" y={{{ [<x>addprefix<x>] }}}/>
\end alpha
<<alpha "Elephant">>

View File

@ -0,0 +1,7 @@
created: 20240216235230574
modified: 20240216235241129
tags:
title: Template
type: text/vnd.tiddlywiki
<$text text=<<currentTiddler>>/><$text text=<<currentTiddler>>/>

View File

@ -0,0 +1,23 @@
created: 20240217000044870
modified: 20240217000326757
tags:
title: Text
type: text/vnd.tiddlywiki
\whitespace trim
This is a&#32;
<% if [<something>match[one]] %>
<% if [<another>match[one]] %>
Indian
<% elseif [<another>match[two]] %>
African
<% else %>
Unknown
<% endif %>
&#32;Elephant
<% elseif [<something>match[two]] %>
Antelope
<% else %>
Crocodile
<% endif %>
, I think.

View File

@ -0,0 +1,7 @@
created: 20240217002301695
modified: 20240217002309108
tags:
title: Textx
type: text/vnd.tiddlywiki
This is a <% if [<something>match[one]] %>Elephant<% else %>Crocodile<% endif %>, I think.

View File

@ -0,0 +1,17 @@
created: 20240216233744705
modified: 20240216233918569
tags:
title: ThisTiddler/Simple
type: text/vnd.tiddlywiki
\whitespace trim
\import Macro
\define print-this-tiddler()
<$text text=<<thisTiddler>>/>
\end
(<$text text=<<thisTiddler>>/>)
(<<print-this-tiddler>>)
(<<imported-print-this-tiddler>>)

View File

@ -0,0 +1,10 @@
created: 20240217005718290
modified: 20240217010023625
tags:
title: TiddlerOTR
type: text/vnd.tiddlywiki
\whitespace trim
<$parameters $parseMode="@parseMode">
<$text text=<<@parseMode>>/>
</$parameters>

View File

@ -0,0 +1,10 @@
created: 20240216232121176
modified: 20240216232450714
tags:
title: TiddlerOne
type: text/vnd.tiddlywiki
\whitespace trim
<$parameters $parseTreeNodes="@parseTreeNodes">
<$text text=<<@parseTreeNodes>>/>
</$parameters>

View File

@ -0,0 +1,9 @@
created: 20240217003745035
modified: 20240217003756359
tags:
title: TiddlerOneA
type: text/vnd.tiddlywiki
\whitespace trim
\parameters(zero:Jaguar,one:'Lizard',two:'Mole')
[{<$text text=<<zero>>/>}{<$text text=<<one>>/>}{<$text text=<<two>>/>}]

View File

@ -0,0 +1,10 @@
created: 20240217001032546
modified: 20240217001051272
tags:
title: TiddlerOnex
type: text/vnd.tiddlywiki
\whitespace trim
<$parameters one='Jaguar' $$two='Piranha'>
<$text text=<<one>>/>:<$text text=<<$two>>/>
</$parameters>

View File

@ -0,0 +1,9 @@
created: 20240216220223927
modified: 20240216220258289
tags:
title: TiddlerThree
type: text/vnd.tiddlywiki
value: Happy Result
wrong: ALL WRONG!!
wrong

View File

@ -0,0 +1,8 @@
created: 20240216220135049
lookup: value
modified: 20240216220222921
newlookup: value
tags:
title: TiddlerTwo
type: text/vnd.tiddlywiki
wrong: wrong

View File

@ -0,0 +1,9 @@
created: 20240217003806216
modified: 20240217004107461
tags:
title: TiddlerTwoA
type: text/vnd.tiddlywiki
\whitespace trim
\parameters(zero:'Mouse',one:Horse,two:'Owl')
(<$transclude $tiddler=<<currentTiddler>> zero=<<zero>> one=<<one>> two=<<two>>/>)

View File

@ -0,0 +1,9 @@
created: 20240216230843012
modified: 20240216231150955
tags:
title: Transclude/CustomWidget/ActionWidget
type: text/vnd.tiddlywiki
\whitespace trim
<$transclude $tiddler='Result'>
</$transclude>

View File

@ -0,0 +1,15 @@
created: 20240216230456556
modified: 20240216230724893
tags:
title: Transclude/CustomWidget/CodeblockOverride-TextParser
type: text/vnd.tiddlywiki
\whitespace trim
\widget $codeblock(code)
<$transclude $variable="copy-to-clipboard" src=<<code>>/>
<$genesis $type="$codeblock" $remappable="no" code=<<code>>/>
\end
\procedure myvariable() hello
<$transclude $variable="myvariable" $type="text/plain" $output="text/plain"/>

View File

@ -0,0 +1,17 @@
created: 20240217005620453
modified: 20240217010209812
tags:
title: Transclude/Parameterised/Mode-TODO
type: text/vnd.tiddlywiki
\whitespace trim
<$transclude $tiddler='TiddlerOTR' one='Ferret'>
This is a block
</$transclude>
<$transclude $tiddler='TiddlerOTR'>
This is inline
</$transclude>

View File

@ -0,0 +1,17 @@
created: 20240216232013920
modified: 20240216233421133
tags:
title: Transclude/Parameterised/ParseTreeNodes
type: text/vnd.tiddlywiki
\whitespace trim
<$transclude $tiddler='TiddlerOne' one='Ferret'>
This is a block
</$transclude>
<$transclude $tiddler='TiddlerOne'>
This is inline
</$transclude>

View File

@ -0,0 +1,12 @@
created: 20240217003617699
modified: 20240217004716416
tags:
title: Transclude/Parameterised/Positional/Shortcut/Parameters
type: text/vnd.tiddlywiki
\whitespace trim
{{TiddlerOneA}}
{{TiddlerOneA|Ferret}}
{{TiddlerOneA|Butterfly|Moth}}
{{TiddlerOneA|Beetle|Scorpion|Snake}}
{{TiddlerOneA||TiddlerTwoA|Beetle|Scorpion|Snake}}

View File

@ -0,0 +1,14 @@
created: 20240217001013617
modified: 20240217001634430
tags:
title: Transclude/Parameterised/Simple
type: text/vnd.tiddlywiki
\whitespace trim
<$transclude $tiddler='TiddlerOnex' one='Ferret'/>
|
<$transclude $tiddler='TiddlerOnex'/>
|
<$transclude $tiddler='TiddlerOnex' one='Ferret' $$two="Osprey"/>
|
<$transclude $tiddler='TiddlerOnex' $$two="Falcon"/>

View File

@ -0,0 +1,10 @@
created: 20240216233422203
modified: 20240216233526220
tags:
title: Widgets/LetWidgetSelfReferences
type: text/vnd.tiddlywiki
\whitespace trim
<$let default={{{ [[default]is[variable]then[aa]else[bb]] }}} >
<<default>>
</$let>

View File

@ -0,0 +1,10 @@
created: 20240216233554694
modified: 20240216233739224
tags:
title: Widgets/LetWidgetUndefinedVariable
type: text/vnd.tiddlywiki
\whitespace trim
<$let test1=<<test>> test2={{{ [<test1>] }}}>
<<test2>>
</$let>

View File

@ -0,0 +1,10 @@
created: 20240217004927961
modified: 20240217005640206
tags:
title: genesis-block-forced-inline-TODO
type: text/vnd.tiddlywiki
<$genesis $type="$reveal" type=nomatch $mode=inline>
Block forced inline
</$genesis>

View File

@ -0,0 +1,15 @@
created: 20240216213957752
modified: 20240216220947555
tags:
title: should deal with let widget
type: text/vnd.tiddlywiki
\whitespace trim
\define macro() TiddlerThree
\define currentTiddler() TiddlerOne
<$let field={{!!text}} currentTiddler='TiddlerTwo' field={{{ [all[current]get<field>] }}}
currentTiddler=<<macro>>
>
<$transclude field=<<field>>/>
</$let>

View File

@ -0,0 +1,13 @@
created: 20240216220948505
modified: 20240216223021916
tags:
title: should parse horizontal rules
type: text/vnd.tiddlywiki
---Not a rule
----
Between
---

View File

@ -0,0 +1,9 @@
created: 20240216223025948
modified: 20240216224308544
tags:
title: should parse inline macro calls
type: text/vnd.tiddlywiki
text <<john one:val1 two: 'val "2"' three: "val '3'" four: """val 4"5'""" five: [[val 5]] >>
<!-- 1: <<john>><<paul>><<george>><<ringo>> -->

View File

@ -0,0 +1,7 @@
created: 20240217012631558
modified: 20240217030241005
tags:
title: text-john-strange text macro call
type: text/vnd.tiddlywiki
text <<john one:val1 two: 'val "2"' three: "val '3'" four: """val 4"5'""" five: [[val 5]] >>