1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-08 04:54:23 +00:00

Clarify/simplify some tests

This commit is contained in:
jeremy@jermolene.com 2022-10-09 13:54:08 +01:00
parent 12a87840fd
commit 9d4aa47356
3 changed files with 40 additions and 12 deletions

View File

@ -26,7 +26,8 @@ title: TiddlerOne
<$$mywidget one="BumbleBee">
Squirrel
</$$mywidget>
<$$mywidget/>
+
title: ExpectedResult
<p>DingoCrocodileBumbleBeeSquirrel</p>
<p>DingoCrocodileBumbleBeeSquirrelJaguarWhale</p>

View File

@ -12,20 +12,16 @@ title: Output
title: TiddlerOne
\whitespace trim
<!-- Redefine the <$text> widget by defining a transcludable variable with that name -->
<!-- Redefining the text widget only works when it is explicitly invoked with the <$text> syntax, and not implicitly via typed text -->
\widget $text(text:'Jaguar')
\whitespace trim
<$genesis $type="$text" $remappable="no" text=<<text>>/>
<$set name="$text" value="">
<$slot $name="ts-raw">
Whale
</$slot>
</$set>
<$genesis $type="$text" $remappable="no" text={{{ [<text>addprefix[≤]addsuffix[≥]] }}}/>
\end
<$text text="Dingo">
Crocodile
</$text>
<$text text="Dingo"/>
Crocodile
+
title: ExpectedResult
<p>DingoCrocodile</p>
<p>≤Dingo≥≤Jaguar≥</p>

View File

@ -0,0 +1,31 @@
title: Transclude/CustomWidget/TextWidgetOverrideWithSlot
description: Custom widget definition redefining the text widget
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$transclude $tiddler='TiddlerOne'>
</$transclude>
+
title: TiddlerOne
\whitespace trim
<!-- Redefine the <$text> widget by defining a transcludable variable with that name -->
\widget $text(text:'Jaguar')
\whitespace trim
<$genesis $type="$text" $remappable="no" text=<<text>>/>
<$set name="$text" value="">
<$slot $name="ts-raw">
Whale
</$slot>
</$set>
\end
<$text text="Dingo">
Crocodile
</$text>
+
title: ExpectedResult
<p>DingoCrocodile</p>