summaryrefslogtreecommitdiff
path: root/tests/cli/utils/test.lua
blob: f06a303a952ddac5bacf8c656614aa9c72e33fc3 (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 _, t in ipairs(task.names()) do
        os.execv("xmake", {t, "--help"})
    end
end