mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-30 17:37:10 +00:00
* $tw.utils.stringifyList will wrap tiddlers starting with `+-~=` in brackets.
This commit is contained in:
committed by
Jeremy Ruston
parent
fada96651e
commit
67066fe86e
@@ -25,6 +25,17 @@ describe("Utility tests", function() {
|
||||
expect(psa(" [[Tidd\u00a0ler8]] two ")).toEqual(["Tidd\u00a0ler8","two"]);
|
||||
});
|
||||
|
||||
it("should handle stringifying a string array", function() {
|
||||
var str = $tw.utils.stringifyList;
|
||||
expect(str([])).toEqual("");
|
||||
expect(str(["Tiddler8"])).toEqual("Tiddler8");
|
||||
expect(str(["Tiddler8 "])).toEqual("[[Tiddler8 ]]");
|
||||
expect(str(["A+B", "A-B", "A=B"])).toEqual("A+B A-B A=B");
|
||||
expect(str(["A B"])).toEqual("[[A B]]");
|
||||
expect(str(["+T", "-T", "~T", "=T", "$T"])).toEqual("[[+T]] [[-T]] [[~T]] [[=T]] $T");
|
||||
expect(str(["A", "", "B"])).toEqual("A B");
|
||||
});
|
||||
|
||||
it("should handle formatting a date string", function() {
|
||||
var fds = $tw.utils.formatDateString,
|
||||
// nov is month: 10!
|
||||
|
||||
Reference in New Issue
Block a user