Test command for [ ... ] conditional constructs.
This represents the POSIX test command using bracket notation. The args are passed directly to the test builtin for evaluation.
Examples
# [ -f file ]
%TestCommand{
args: ["-f", "file"]
}
# [ "$x" -eq 5 ]
%TestCommand{
args: [%Word{...}, "-eq", "5"]
}
Summary
Types
@type t() :: %Bash.AST.TestCommand{ args: [Bash.AST.Word.t() | String.t()], exit_code: 0..255 | nil, meta: Bash.AST.Meta.t(), state_updates: map() }