mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-02 14:29:55 +00:00
Fix up the tests
This commit is contained in:
parent
4af573aaf9
commit
96b85edfa2
@ -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>
|
@ -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
|
@ -30,6 +30,13 @@ describe("Wiki-based tests", function() {
|
|||||||
wiki.addTiddler(coreTiddler);
|
wiki.addTiddler(coreTiddler);
|
||||||
}
|
}
|
||||||
wiki.addTiddlers(readMultipleTiddlersTiddler(title));
|
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
|
// Complain if we don't have the ouput and expected results
|
||||||
if(!wiki.tiddlerExists("Output")) {
|
if(!wiki.tiddlerExists("Output")) {
|
||||||
throw "Missing 'Output' tiddler";
|
throw "Missing 'Output' tiddler";
|
||||||
|
Loading…
Reference in New Issue
Block a user