started testing text util functions...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-09-12 02:33:38 +03:00
parent 35eea57ab9
commit 3c3b5b30ca
2 changed files with 18 additions and 1 deletions

View File

@ -28,6 +28,6 @@
"devDependencies": { "devDependencies": {
"c8": "^7.3.0", "c8": "^7.3.0",
"colors": "^1.4.0", "colors": "^1.4.0",
"ig-test": "^1.3.8" "ig-test": "^1.4.4"
} }
} }

17
test.js
View File

@ -671,6 +671,23 @@ var cases = test.Cases({
assert(typeof(xx.call) == 'function', 'xx.call is a function') assert(typeof(xx.call) == 'function', 'xx.call is a function')
assert(xx.call(null), 'xx.call(null)') assert(xx.call(null), 'xx.call(null)')
}, },
text_cases: [
[`a
b
c`,
'a\n\tb\nc'],
[`a
b
c`,
'a\n\tb\n\tc'],
],
text: function(assert){
this.text_cases.map(function([orig, target]){
assert(object.doc([orig]) == target)
assert(object.text([orig]) == target)
})
},
}) })