diff --git a/rabbithole/core/modules/commands/wikitest.js b/rabbithole/core/modules/commands/wikitest.js new file mode 100644 index 000000000..9f686284b --- /dev/null +++ b/rabbithole/core/modules/commands/wikitest.js @@ -0,0 +1,73 @@ +/*\ +title: $:/core/commands/wikitest.js +type: application/javascript +module-type: command + +wikitest command + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +"use strict"; + +exports.info = { + name: "wikitest", + synchronous: false +}; + +var Command = function(params,commander) { + this.params = params; + this.commander = commander; +}; + +Command.prototype.execute = function() { + if(this.params.length <1) { + return "Missing parameters"; + } + var fs = require("fs"), + path = require("path"), + testdirectory = this.params[0], + saveResults = this.params[1] === "save", + files = fs.readdirSync(testdirectory), + titles = [], + f,t,extname,basename; + for(f=0; f 1) { + throw "Cannot use .JSON files"; + } + this.commander.wiki.addTiddler(new $tw.Tiddler(tiddlers[0])); + titles.push(tiddlers[0].title); + } + } + for(t=0; t
SixthTiddler
11 February 2011
Jermolene

SixthTiddler
11 February 2011
Jermolene

EighthTiddler



FirstTiddler



\ No newline at end of file +
SixthTiddler
11 February 2011
Jermolene

SixthTiddler
11 February 2011
Jermolene

EighthTiddler



FirstTiddler



\ No newline at end of file diff --git a/test/wikitests/Fifth Tiddler.html b/test/wikitests/Fifth Tiddler.html index 2710d8d8e..5caee7e4d 100644 --- a/test/wikitests/Fifth Tiddler.html +++ b/test/wikitests/Fifth Tiddler.html @@ -1 +1 @@ -
A caption above the table
LeftMiddleRight
North WestNorthNorth East
WestHereEast
South WestSouthSouth East
\ No newline at end of file +
A caption above the table
LeftMiddleRight
North WestNorthNorth East
WestHereEast
South WestSouthSouth East
\ No newline at end of file diff --git a/test/wikitests/FirstTiddler.html b/test/wikitests/FirstTiddler.html index 14f19c414..f877ee587 100644 --- a/test/wikitests/FirstTiddler.html +++ b/test/wikitests/FirstTiddler.html @@ -1 +1 @@ -
This is the text of the first tiddler, with a link to the SecondTiddler, too. And a link to http://tiddlywiki.com/.
\ No newline at end of file +This is the text of the first tiddler, with a link to the SecondTiddler, too. And a link to http://tiddlywiki.com/.
\ No newline at end of file diff --git a/test/wikitests/Fourth Tiddler.html b/test/wikitests/Fourth Tiddler.html index b9fa3b19e..bb1e861f8 100644 --- a/test/wikitests/Fourth Tiddler.html +++ b/test/wikitests/Fourth Tiddler.html @@ -1 +1 @@ -
A missing image and a $1 couple of Ç Ç "HTML Entity"
\ No newline at end of file +A missing image and a $1 couple of Ç Ç "HTML Entity" \ No newline at end of file diff --git a/test/wikitests/SecondTiddler.html b/test/wikitests/SecondTiddler.html index 5e0c661fa..3454d11f8 100644 --- a/test/wikitests/SecondTiddler.html +++ b/test/wikitests/SecondTiddler.html @@ -1 +1 @@ -

Heading

This is the second tiddler. It has a list:
  • Item one
  • Item two
  • Item three
And a macro invocation 5.0.0 and a custom class
\ No newline at end of file +

Heading

This is the second tiddler. It has a list:
And a macro invocation 5.0.0.a2 and a custom class
\ No newline at end of file diff --git a/test/wikitests/SecondTiddler.txt b/test/wikitests/SecondTiddler.txt index 9defebc87..a78ebd9d3 100644 --- a/test/wikitests/SecondTiddler.txt +++ b/test/wikitests/SecondTiddler.txt @@ -1 +1 @@ -HeadingThis is the second tiddler. It has a list: Item one Item two Item threeAnd a macro invocation 5.0.0 and a custom class \ No newline at end of file +HeadingThis is the second tiddler. It has a list: Item one Item two Item threeAnd a macro invocation 5.0.0.a2 and a custom class \ No newline at end of file diff --git a/test/wikitests/SeventhTiddler.html b/test/wikitests/SeventhTiddler.html index c71c1b1a9..5a8e08982 100644 --- a/test/wikitests/SeventhTiddler.html +++ b/test/wikitests/SeventhTiddler.html @@ -1 +1 @@ -
4

SeventhTiddler

window
\ No newline at end of file +4

SeventhTiddler

window
\ No newline at end of file diff --git a/test/wikitests/SixthTiddler.html b/test/wikitests/SixthTiddler.html index 6b55d3c0c..49ad697fc 100644 --- a/test/wikitests/SixthTiddler.html +++ b/test/wikitests/SixthTiddler.html @@ -1 +1 @@ -
SixthTiddler
11 February 2011
Jermolene
\ No newline at end of file +SixthTiddler
11 February 2011
Jermolene
\ No newline at end of file diff --git a/test/wikitests/ThirdTiddler.html b/test/wikitests/ThirdTiddler.html index 5227a2de7..f5e7eb5be 100644 --- a/test/wikitests/ThirdTiddler.html +++ b/test/wikitests/ThirdTiddler.html @@ -1 +1 @@ -
An explicit link Fourth Tiddler and a pretty link and a transclusion
A missing image and a Stringy couple of Ç Ç "HTML Entity"



\ No newline at end of file +An explicit link Fourth Tiddler and a pretty link and a transclusion
A missing image and a Stringy couple of Ç Ç "HTML Entity"



\ No newline at end of file