1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

Fix up the tests

This commit is contained in:
Jeremy Ruston 2024-10-24 10:46:48 +01:00
parent 4af573aaf9
commit 96b85edfa2
3 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,18 @@
title: Operators/Colour/ColourFunctionDiv
description: Simple colour function applied to a DIV
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
\import [subfilter{$:/core/config/GlobalImportFilter}]
<div style.background=<<colour page-background>>>
Something
</div>
+
title: ExpectedResult
<div style="background:#f4f4f4;">
Something
</div>

View File

@ -0,0 +1,18 @@
title: Operators/Colour/ColourFunctionSimple
description: Simple colour function
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\parsermode inline
\import [subfilter{$:/core/config/GlobalImportFilter}]
<$text text={{{ [subfilter{Filter}] }}}/>
+
title: Filter
[function[colour],[background]]
+
title: ExpectedResult
#ffffff

View File

@ -30,6 +30,13 @@ describe("Wiki-based tests", function() {
wiki.addTiddler(coreTiddler);
}
wiki.addTiddlers(readMultipleTiddlersTiddler(title));
// Unpack plugin tiddlers
wiki.readPluginInfo();
wiki.registerPluginTiddlers("plugin");
wiki.unpackPluginTiddlers();
wiki.addIndexersToWiki();
// Clear changes queue
wiki.clearTiddlerEventQueue();
// Complain if we don't have the ouput and expected results
if(!wiki.tiddlerExists("Output")) {
throw "Missing 'Output' tiddler";