1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

Add unittest.testing() to make test building conditional

This commit is contained in:
dmiller
2014-03-06 17:15:05 +00:00
parent f8242124b8
commit 88146749f6
5 changed files with 33 additions and 2 deletions

View File

@@ -396,6 +396,10 @@ function utf8to16(from)
return table.concat(buf)
end
if not unittest.testing() then
return _ENV
end
test_suite = unittest.TestSuite:new()
test_suite:add_test(function()
local pos, cp = utf8_dec("\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E")