test(lua): fix n6.lua, and add more tests

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-05-18 13:52:16 -07:00
parent f826e98196
commit f53254b389

View file

@ -1,5 +1,8 @@
assert(name("a", "b"):append_after(1) == name("a", "b1")) assert(name("a", "b"):append_after(1) == name("a", "b_1"))
assert(name("a", 1):append_after(2) == name("a", 1, "2")) assert(name("a", 1):append_after(2) == name("a", 1, "_2"))
assert(name("a", "b"):append_after("k") == name("a", "bk")) assert(name("a", "b"):append_after("k") == name("a", "bk"))
assert(name("a", "b"):append_before("k") == name("a", "kb")) assert(name("a", "b"):append_before("k") == name("a", "kb"))
assert(name("a", 1):append_before("k") == name("a", "k", 1)) assert(name("a", 1):append_before("k") == name("a", "k", 1))
assert(name():append_after("a") == name("a"))
assert(name():append_after(1) == name("_1"))
assert(name():append_before("b") == name("b"))