summaryrefslogtreecommitdiff
path: root/tests/cli/utils/test.lua
blob: e54f5d0e6c8ea39173d757c55b1bcecf74d32990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function test_version(t)
    local output = os.iorunv("xmake", {"--version"})
    local vstr = output:match("xmake v(.-),")
    t:are_equal(vstr, tostring(xmake.version()))
end

function test_help(t)
    import("core.base.task")
    for _, taskname in ipairs(task.names()) do
        os.runv("xmake", {taskname, "--help"})
    end
end