test

    test command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.3
    License
    Apache-2.0
    Last updated
    9 days ago
    Downloads
    94

    #test

    Evaluate conditions for MoonX.

    moonx cli/test@0.2.3 EXPRESSION

    #Supported scope

    Evaluate string/integer comparisons and file type, access, size and timestamp predicates. Exit 0 for true, 1 for false and 2 for errors.

    #Options

    OptionDescription
    -n / -z STRINGTest nonempty / empty strings.
    = / != / -eq / -ne / -gt / -ge / -lt / -leCompare strings or integers.
    -e / -f / -d / -L / -h / -p / -S / -b / -cTest existence or file type.
    -r / -w / -x / -s / -NTest access, nonempty size or modification since access.
    -nt / -otCompare file modification times.
    ! / -a / -o / ( )Negate or combine expressions.
    --help / --versionShow help / package version.

    #Limitations

    • Terminal -t, permission-bit/owner predicates and same-file -ef are unsupported.

    #Examples

    moonx cli/test@0.2.3 -f notes.txt moonx cli/test@0.2.3 3 -gt 2

    Source Files