21 lines
527 B
Plaintext
21 lines
527 B
Plaintext
|
modes = require "irce.modules.ngircd.modes"
|
||
|
|
||
|
describe "mode conversion", ->
|
||
|
it "has modes2prefix", ->
|
||
|
assert.truthy modes.mode2prefix
|
||
|
|
||
|
it "has prefix2modes", ->
|
||
|
assert.truthy modes.prefix2mode
|
||
|
|
||
|
it "has convert", ->
|
||
|
assert.truthy modes.convert
|
||
|
|
||
|
describe "convert", ->
|
||
|
for k, v in pairs modes.mode2prefix
|
||
|
msg = string.format "%s: %s", k, v
|
||
|
it msg, ->
|
||
|
assert.equal(modes.convert(k), v)
|
||
|
msg = string.format "%s: %s", v, k
|
||
|
it msg, ->
|
||
|
assert.equal(modes.convert(v), k)
|