-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
title: CompoundTiddlers | ||
modified: 20240507221902644 | ||
created: 20240507221902644 | ||
tags: Concepts | ||
|
||
Compound tiddlers are a special type of tiddler that can store one or more payload tiddlers. The tiddlers within a compound tiddler are only accessible via special operations, typically with the TestCaseWidget. | ||
|
||
The compound tiddler format is extremely simple, and includes the notable flaw that it does not permit tiddlers that contain a plus sign (`+`) on a line by itself. It is not intended as a general purpose way of storing tiddler data. | ||
|
||
Compound tiddlers are identified by having their type field set to `text/vnd.tiddlywiki-multiple`. | ||
|
||
The content of a compound tiddler consists of a sequence of tiddlers separated by a plus sign (`+`) on a line by itself. Each tiddler uses the same format as [[.tid files|TiddlerFiles]]. | ||
|
||
For example: | ||
|
||
``` | ||
title: First | ||
tags: one two | ||
|
||
This is the first tiddler | ||
+ | ||
title: Second | ||
tags: three four | ||
|
||
This is the second tiddler | ||
+ | ||
title: third | ||
tags: five six | ||
|
||
This is the third tiddler | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
title: TestCaseTiddlers | ||
modified: 20240507221902644 | ||
created: 20240507221902644 | ||
tags: Concepts | ||
|
||
Testcase tiddlers encapsulate one or more tiddlers that can be displayed as a [[testcase|TestCaseWidget]]: an independent embedded wiki that can be used for testing or learning purposes. | ||
|
||
Testcase tiddlers are formatted as CompoundTiddlers, allowing them to contain multiple tiddlers packed into one. | ||
|
||
Behind the scenes, the templates used to view TestCaseTiddlers use the <<.wlink TestCaseWidget>> widget. | ||
Testcase tiddlers have the following fields: | ||
|
||
! Testcase Conventions | ||
|!Field |!Description | | ||
|<<.field type>> | Should be set to `text/vnd.tiddlywiki-multiple` | | ||
|<<.field tags>> | Testcases are tagged [[$:/tags/wiki-test-spec]]. Test cases that intentionally fail are tagged [[$:/tags/wiki-test-spec-failing]] | | ||
|<<.field description>> |Descriptive heading for the test, intended to make it easy to identify the test | | ||
|<<.field display-format>> |Optional, defaults to `wikitext`. Set to `plaintext` to cause the output to be rended as plain text | | ||
|
||
The following conventions are used for testcase tiddlers: | ||
Some payload tiddlers are set aside for special purposes: | ||
|
||
|!Tiddler |!Description | | ||
|''Narrative'' |Narrative description of the test, intended to explain the purpose and operation of the test | | ||
|''Output'' |The tiddler that produces the test output | | ||
|''~ExpectedResult'' |HTML of expected result of rendering the ''Output'' tiddler | | ||
|
||
* `Description` contains a brief description of the test (rendered in inline mode) | ||
* `Output` contains the tiddler text to be rendered. It can also reference other tiddlers | ||
* `ExpectedResult` contains the HTML that should match the rendering of the tiddler `Output` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters