mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
The logo prints from the UI alone (ui.UI.Logo, msg.Reporter's Logo), once a run, only with stdout a terminal (or a test build's PickOnPipe), not with --no-input, --json or names mode; its mark green, plain under NO_COLOR. The CLI reference's pages don't get it: only the root's help func prints it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
96 lines
3.1 KiB
Plaintext
96 lines
3.1 KiB
Plaintext
# devvm --help prints usage.
|
||
exec devvm --help
|
||
stdout '^Usage:'
|
||
stdout '^ devvm \[flags\]$'
|
||
! stdout 'IMAGE\]'
|
||
! stderr .
|
||
! stdout '❯'
|
||
cp stdout help.txt
|
||
|
||
# Without names mode, still without a terminal: no logo either.
|
||
env DEVVM_MESSAGES=
|
||
exec devvm --help
|
||
stdout '^Usage:'
|
||
! stdout '❯ devvm'
|
||
env DEVVM_MESSAGES=names
|
||
|
||
# So do devvm help and -h; devvm help COMMAND prints the command's.
|
||
exec devvm help
|
||
cmp stdout help.txt
|
||
exec devvm -h
|
||
cmp stdout help.txt
|
||
exec devvm help build
|
||
stdout 'devvm build IMAGE \[flags\]'
|
||
exec devvm build --help
|
||
stdout 'devvm build IMAGE \[flags\]'
|
||
! stub_calls
|
||
|
||
# An unknown flag is a usage error: its message on stderr, then the line
|
||
# naming the command's own help.
|
||
! exec devvm --nope
|
||
cmp stderr nope-flag.txt
|
||
! stdout .
|
||
! stub_calls
|
||
|
||
# devvm takes no word but a command's. A toolchain's, an agent's or a
|
||
# layer's name, or several joined with + or a comma, is a usage error
|
||
# naming devvm's --help that points to the flags choosing them; any other
|
||
# word gets a did-you-mean when a command is close. Nothing runs.
|
||
! exec devvm node
|
||
stderr '^devvm: no_command_part flags=--tools node word=node$'
|
||
stderr '^usage_help command=devvm$'
|
||
! exec devvm claude
|
||
stderr '^devvm: no_command_part flags=--agents claude word=claude$'
|
||
! exec devvm docker
|
||
stderr '^devvm: no_command_part flags=--layers docker word=docker$'
|
||
! exec devvm node+claude
|
||
stderr '^devvm: no_command_part flags=--tools node --agents claude word=node\+claude$'
|
||
stderr '^usage_help command=devvm$'
|
||
mkdir $XDG_CONFIG_HOME/devvm/layers
|
||
cp $WORK/pg.sh $XDG_CONFIG_HOME/devvm/layers/pg.sh
|
||
! exec devvm pg,node
|
||
stderr '^devvm: no_command_part flags=--tools node --layers pg word=pg,node$'
|
||
! exec devvm node+nope
|
||
stderr '^devvm: no_command word=node\+nope$'
|
||
! exec devvm stpo
|
||
stderr '^devvm: no_command_like command=stop word=stpo$'
|
||
stderr '^usage_help command=devvm$'
|
||
! stdout .
|
||
! stub_calls
|
||
|
||
# Flags for a new VM are devvm's alone, so other commands refuse
|
||
# them, before or after the command's name.
|
||
! exec devvm ls --cpus 4
|
||
stderr '^devvm: flag_unknown command=devvm ls flag=--cpus$'
|
||
! exec devvm --cpus 4 ls
|
||
stderr '^devvm: flag_unknown command=devvm ls flag=--cpus$'
|
||
! exec devvm tools add node --from node:24
|
||
stderr '^devvm: flag_unknown command=devvm tools add flag=--from$'
|
||
# No command takes --backend: devvm, its image commands and the rest
|
||
# refuse it first.
|
||
! exec devvm --backend lima
|
||
stderr '^devvm: flag_unknown command=devvm flag=--backend$'
|
||
! exec devvm restart --backend lima
|
||
stderr '^devvm: flag_unknown command=devvm restart flag=--backend$'
|
||
! exec devvm build --backend lima base
|
||
stderr '^devvm: flag_unknown command=devvm build flag=--backend$'
|
||
stderr '^usage_help command=devvm build$'
|
||
! stub_calls
|
||
|
||
# No flag or argument takes an empty value to mean none or its default.
|
||
! exec devvm --ports ''
|
||
stderr '^devvm: flag_blank flag=ports$'
|
||
! exec devvm --cpus=
|
||
stderr '^devvm: flag_blank flag=cpus$'
|
||
! exec devvm ''
|
||
stderr '^devvm: arg_blank command=devvm$'
|
||
! exec devvm history export ''
|
||
stderr '^devvm: arg_blank command=devvm history export$'
|
||
! stub_calls
|
||
|
||
-- nope-flag.txt --
|
||
devvm: flag_unknown command=devvm flag=--nope
|
||
usage_help command=devvm
|
||
-- pg.sh --
|
||
set -euo pipefail
|