--[[-- 起点验证码网页回归,使用已有 Node。 @module tests.moonsource_qidian.web_spec --]] local Assert = require("support.assert") local here = debug.getinfo(1, "S").source:match("^@(.+)/[^/]+$") or "." local root = here .. "/../.." local pipe = assert(io.popen('node "' .. here .. '/web_spec.js" "' .. root .. '" 2>&1')) local output = pipe:read("*a") pipe:close() Assert.is_true(output:find("qidian web: OK", 1, true) ~= nil, output)