/
010_helpers.t.js
39 lines (20 loc) · 1.65 KB
/
010_helpers.t.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
StartTest(function(t) {
t.plan(3)
var async0 = t.beginAsync()
use('Shotenjin.Template', function () {
//======================================================================================================================================================================================================================================================
t.diag('Sanity')
t.ok(Shotenjin.Template, "Shotenjin.Template is here")
//======================================================================================================================================================================================================================================================
t.diag('Instantiation')
var tenjin = new Shotenjin.Template()
t.ok(tenjin, "'Shotenjin.Template' class was succesfully created")
//======================================================================================================================================================================================================================================================
t.diag('Helper functions')
t.ok(tenjin.escapeXml('<xml><"more"></xml>') == '<xml><"more"></xml>', 'XML escaping works')
// t.ok(tenjin.trim(' string ') == 'string', 'Trimming works')
//
// t.ok(tenjin.trimMulti(' string1 \n string2 \n string3') == 'string1\nstring2\nstring3', 'Multi-line trimming works')
t.endAsync(async0)
})
})