test(help): OK test cases

This commit is contained in:
Lewis Wynne 2025-11-20 14:40:10 +00:00
parent 2e50d4392f
commit 0ade5faec9
10 changed files with 320 additions and 0 deletions

44
testdata/help__set__ok.ct vendored Normal file
View file

@ -0,0 +1,44 @@
$ pda help set
$ pda set --help
Set a value for a key by passing VALUE or Stdin. Optionally specify a db.
PDA supports parsing Go templates. Actions are delimited with {{ }}.
For example:
'Hello, {{ .NAME }}' can be substituted with NAME="John Doe".
'Hello, {{ env "USER" }}' will fetch the USER env variable.
'Hello, {{ default "World" .NAME }}' will default to World if NAME is blank.
'Hello, {{ require .NAME }}' will error if NAME is blank.
'{{ enum .NAME "Alice" "Bob" }}' allows only NAME=Alice or NAME=Bob.
Usage:
pda set KEY[@DB] [VALUE] [flags]
Aliases:
set, s
Flags:
-h, --help help for set
--secret Mark the stored value as a secret
-t, --ttl duration Expire the key after the provided duration (e.g. 24h, 30m)
Set a value for a key by passing VALUE or Stdin. Optionally specify a db.
PDA supports parsing Go templates. Actions are delimited with {{ }}.
For example:
'Hello, {{ .NAME }}' can be substituted with NAME="John Doe".
'Hello, {{ env "USER" }}' will fetch the USER env variable.
'Hello, {{ default "World" .NAME }}' will default to World if NAME is blank.
'Hello, {{ require .NAME }}' will error if NAME is blank.
'{{ enum .NAME "Alice" "Bob" }}' allows only NAME=Alice or NAME=Bob.
Usage:
pda set KEY[@DB] [VALUE] [flags]
Aliases:
set, s
Flags:
-h, --help help for set
--secret Mark the stored value as a secret
-t, --ttl duration Expire the key after the provided duration (e.g. 24h, 30m)