test

    test command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.5
    License
    Apache-2.0
    Last updated
    8 hours ago
    Downloads
    152

    #test

    Evaluate a condition and report it through the exit status with MoonX.

    #Usage

    moonx cli/test -f input.txt moonx cli/test 3 -lt 5 moonx cli/test -n value

    Return 0 for true, 1 for false and a nonzero error status for invalid expressions. Successful evaluation produces no output.

    #Common options

    OptionDescription
    -n VALUETrue when the string is nonempty.
    -z VALUETrue when the string is empty.
    -e VALUE, -a VALUETest existence or file type.
    -f VALUETest existence or file type.
    -d VALUETest existence or file type.
    --helpShow help.
    --versionShow the version.
    -eqCompare integer operands for equality.
    -ltCompare integer operands using less than.

    Use --help for the complete option list.

    #Notes

    • Supports strings, Int64 integers and available file/access/size/time predicates. Terminal, ownership and unavailable mode/identity queries are unsupported.
    • Unary -a is a project alias for file existence.

    See the compatibility guide for the supported profile.

    Source Files