From 67293fc09fea737de37a2fea7b211aa44695b5bf Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 15 Sep 2017 17:07:57 -0400 Subject: Port tests to the `busted` test runner --- tests/test_utf8.lua | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 tests/test_utf8.lua (limited to 'tests/test_utf8.lua') diff --git a/tests/test_utf8.lua b/tests/test_utf8.lua deleted file mode 100644 index 48859960..00000000 --- a/tests/test_utf8.lua +++ /dev/null @@ -1,18 +0,0 @@ -package.cpath = "../?.so" -package.path = "../?.lua"; - -function valid() - local encodings = require "util.encodings"; - local utf8 = assert(encodings.utf8, "no encodings.utf8 module"); - - for line in io.lines("utf8_sequences.txt") do - local data = line:match(":%s*([^#]+)"):gsub("%s+", ""):gsub("..", function (c) return string.char(tonumber(c, 16)); end) - local expect = line:match("(%S+):"); - if expect ~= "pass" and expect ~= "fail" then - error("unknown expectation: "..line:match("^[^:]+")); - end - local valid = utf8.valid(data); - assert_equal(valid, utf8.valid(data.." ")); - assert_equal(valid, expect == "pass", line); - end -end -- cgit v1.2.3