1 var abbrev = require('./abbrev.js')
2 var assert = require("assert")
3 var util = require("util")
5 console.log("TAP Version 13")
8 function test (list, expect) {
10 var actual = abbrev(list)
11 assert.deepEqual(actual, expect,
12 "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+
13 "actual: "+util.inspect(actual))
14 actual = abbrev.apply(exports, list)
15 assert.deepEqual(abbrev.apply(exports, list), expect,
16 "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+
17 "actual: "+util.inspect(actual))
18 console.log('ok - ' + list.join(' '))
21 test([ "ruby", "ruby", "rules", "rules", "rules" ],
28 test(["fool", "foom", "pool", "pope"],
36 test(["a", "ab", "abc", "abcd", "abcde", "acde"],
47 console.log("0..%d", count)