test(help): OK test cases
This commit is contained in:
parent
2e50d4392f
commit
0ade5faec9
10 changed files with 320 additions and 0 deletions
24
testdata/help__del-db__ok.ct
vendored
Normal file
24
testdata/help__del-db__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
$ pda help del-db
|
||||
$ pda del-db --help
|
||||
Delete a database.
|
||||
|
||||
Usage:
|
||||
pda del-db DB [flags]
|
||||
|
||||
Aliases:
|
||||
del-db, delete-db, rm-db, remove-db
|
||||
|
||||
Flags:
|
||||
-f, --force Force delete without confirmation
|
||||
-h, --help help for del-db
|
||||
Delete a database.
|
||||
|
||||
Usage:
|
||||
pda del-db DB [flags]
|
||||
|
||||
Aliases:
|
||||
del-db, delete-db, rm-db, remove-db
|
||||
|
||||
Flags:
|
||||
-f, --force Force delete without confirmation
|
||||
-h, --help help for del-db
|
||||
24
testdata/help__del__ok.ct
vendored
Normal file
24
testdata/help__del__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
$ pda help del
|
||||
$ pda del --help
|
||||
Delete a key. Optionally specify a db.
|
||||
|
||||
Usage:
|
||||
pda del KEY[@DB] [flags]
|
||||
|
||||
Aliases:
|
||||
del, delete, rm, remove
|
||||
|
||||
Flags:
|
||||
-f, --force Force delete without confirmation
|
||||
-h, --help help for del
|
||||
Delete a key. Optionally specify a db.
|
||||
|
||||
Usage:
|
||||
pda del KEY[@DB] [flags]
|
||||
|
||||
Aliases:
|
||||
del, delete, rm, remove
|
||||
|
||||
Flags:
|
||||
-f, --force Force delete without confirmation
|
||||
-h, --help help for del
|
||||
26
testdata/help__dump__ok.ct
vendored
Normal file
26
testdata/help__dump__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
$ pda help dump
|
||||
$ pda dump --help
|
||||
Dump all key/value pairs as NDJSON
|
||||
|
||||
Usage:
|
||||
pda dump [DB] [flags]
|
||||
|
||||
Aliases:
|
||||
dump, export
|
||||
|
||||
Flags:
|
||||
-e, --encoding string value encoding: auto, base64, or text (default "auto")
|
||||
-h, --help help for dump
|
||||
--secret Include entries marked as secret
|
||||
Dump all key/value pairs as NDJSON
|
||||
|
||||
Usage:
|
||||
pda dump [DB] [flags]
|
||||
|
||||
Aliases:
|
||||
dump, export
|
||||
|
||||
Flags:
|
||||
-e, --encoding string value encoding: auto, base64, or text (default "auto")
|
||||
-h, --help help for dump
|
||||
--secret Include entries marked as secret
|
||||
44
testdata/help__get__ok.ct
vendored
Normal file
44
testdata/help__get__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
$ pda help get
|
||||
$ pda get --help
|
||||
Get a value for a key. Optionally specify a db.
|
||||
|
||||
{{ .TEMPLATES }} can be filled by passing TEMPLATE=VALUE as an
|
||||
additional argument after the initial KEY being fetched.
|
||||
|
||||
For example:
|
||||
pda set greeting 'Hello, {{ .NAME }}!'
|
||||
pda get greeting NAME=World
|
||||
|
||||
Usage:
|
||||
pda get KEY[@DB] [flags]
|
||||
|
||||
Aliases:
|
||||
get, g
|
||||
|
||||
Flags:
|
||||
-h, --help help for get
|
||||
-b, --include-binary include binary data in text output
|
||||
--no-template directly output template syntax
|
||||
-c, --run execute the result as a shell command
|
||||
--secret display values marked as secret
|
||||
Get a value for a key. Optionally specify a db.
|
||||
|
||||
{{ .TEMPLATES }} can be filled by passing TEMPLATE=VALUE as an
|
||||
additional argument after the initial KEY being fetched.
|
||||
|
||||
For example:
|
||||
pda set greeting 'Hello, {{ .NAME }}!'
|
||||
pda get greeting NAME=World
|
||||
|
||||
Usage:
|
||||
pda get KEY[@DB] [flags]
|
||||
|
||||
Aliases:
|
||||
get, g
|
||||
|
||||
Flags:
|
||||
-h, --help help for get
|
||||
-b, --include-binary include binary data in text output
|
||||
--no-template directly output template syntax
|
||||
-c, --run execute the result as a shell command
|
||||
--secret display values marked as secret
|
||||
18
testdata/help__help__ok.ct
vendored
Normal file
18
testdata/help__help__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
$ pda help help
|
||||
$ pda help --help
|
||||
Help provides help for any command in the application.
|
||||
Simply type pda help [path to command] for full details.
|
||||
|
||||
Usage:
|
||||
pda help [command] [flags]
|
||||
|
||||
Flags:
|
||||
-h, --help help for help
|
||||
Help provides help for any command in the application.
|
||||
Simply type pda help [path to command] for full details.
|
||||
|
||||
Usage:
|
||||
pda help [command] [flags]
|
||||
|
||||
Flags:
|
||||
-h, --help help for help
|
||||
22
testdata/help__list-dbs__ok.ct
vendored
Normal file
22
testdata/help__list-dbs__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
$ pda help list-dbs
|
||||
$ pda list-dbs --help
|
||||
List all dbs.
|
||||
|
||||
Usage:
|
||||
pda list-dbs [flags]
|
||||
|
||||
Aliases:
|
||||
list-dbs, ls-dbs, lsd
|
||||
|
||||
Flags:
|
||||
-h, --help help for list-dbs
|
||||
List all dbs.
|
||||
|
||||
Usage:
|
||||
pda list-dbs [flags]
|
||||
|
||||
Aliases:
|
||||
list-dbs, ls-dbs, lsd
|
||||
|
||||
Flags:
|
||||
-h, --help help for list-dbs
|
||||
36
testdata/help__list__ok.ct
vendored
Normal file
36
testdata/help__list__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
$ pda help list
|
||||
$ pda list --help
|
||||
List the contents of a db.
|
||||
|
||||
Usage:
|
||||
pda list [DB] [flags]
|
||||
|
||||
Aliases:
|
||||
list, ls
|
||||
|
||||
Flags:
|
||||
-b, --binary include binary data in text output
|
||||
-o, --format format output format (table|tsv|csv|markdown|html) (default table)
|
||||
--header include header row
|
||||
-h, --help help for list
|
||||
--no-keys suppress the key column
|
||||
--no-values suppress the value column
|
||||
-S, --secret display values marked as secret
|
||||
-t, --ttl append a TTL column when entries expire
|
||||
List the contents of a db.
|
||||
|
||||
Usage:
|
||||
pda list [DB] [flags]
|
||||
|
||||
Aliases:
|
||||
list, ls
|
||||
|
||||
Flags:
|
||||
-b, --binary include binary data in text output
|
||||
-o, --format format output format (table|tsv|csv|markdown|html) (default table)
|
||||
--header include header row
|
||||
-h, --help help for list
|
||||
--no-keys suppress the key column
|
||||
--no-values suppress the value column
|
||||
-S, --secret display values marked as secret
|
||||
-t, --ttl append a TTL column when entries expire
|
||||
58
testdata/help__ok.ct
vendored
Normal file
58
testdata/help__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
$ pda help
|
||||
$ pda --help
|
||||
▄▄
|
||||
██
|
||||
██▄███▄ ▄███▄██ ▄█████▄
|
||||
██▀ ▀██ ██▀ ▀██ ▀ ▄▄▄██
|
||||
██ ██ ██ ██ ▄██▀▀▀██
|
||||
███▄▄██▀ ▀██▄▄███ ██▄▄▄███
|
||||
██ ▀▀▀ ▀▀▀ ▀▀ ▀▀▀▀ ▀▀
|
||||
██ (c) 2025 Lewis Wynne
|
||||
|
||||
Usage:
|
||||
pda [command]
|
||||
|
||||
Available Commands:
|
||||
completion Generate the autocompletion script for the specified shell
|
||||
del Delete a key. Optionally specify a db.
|
||||
del-db Delete a database.
|
||||
dump Dump all key/value pairs as NDJSON
|
||||
get Get a value for a key. Optionally specify a db.
|
||||
help Help about any command
|
||||
list List the contents of a db.
|
||||
list-dbs List all dbs.
|
||||
restore Restore key/value pairs from an NDJSON dump
|
||||
set Set a value for a key by passing VALUE or Stdin. Optionally specify a db.
|
||||
|
||||
Flags:
|
||||
-h, --help help for pda
|
||||
|
||||
Use "pda [command] --help" for more information about a command.
|
||||
▄▄
|
||||
██
|
||||
██▄███▄ ▄███▄██ ▄█████▄
|
||||
██▀ ▀██ ██▀ ▀██ ▀ ▄▄▄██
|
||||
██ ██ ██ ██ ▄██▀▀▀██
|
||||
███▄▄██▀ ▀██▄▄███ ██▄▄▄███
|
||||
██ ▀▀▀ ▀▀▀ ▀▀ ▀▀▀▀ ▀▀
|
||||
██ (c) 2025 Lewis Wynne
|
||||
|
||||
Usage:
|
||||
pda [command]
|
||||
|
||||
Available Commands:
|
||||
completion Generate the autocompletion script for the specified shell
|
||||
del Delete a key. Optionally specify a db.
|
||||
del-db Delete a database.
|
||||
dump Dump all key/value pairs as NDJSON
|
||||
get Get a value for a key. Optionally specify a db.
|
||||
help Help about any command
|
||||
list List the contents of a db.
|
||||
list-dbs List all dbs.
|
||||
restore Restore key/value pairs from an NDJSON dump
|
||||
set Set a value for a key by passing VALUE or Stdin. Optionally specify a db.
|
||||
|
||||
Flags:
|
||||
-h, --help help for pda
|
||||
|
||||
Use "pda [command] --help" for more information about a command.
|
||||
24
testdata/help__restore__ok.ct
vendored
Normal file
24
testdata/help__restore__ok.ct
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
$ pda help restore
|
||||
$ pda restore --help
|
||||
Restore key/value pairs from an NDJSON dump
|
||||
|
||||
Usage:
|
||||
pda restore [DB] [flags]
|
||||
|
||||
Aliases:
|
||||
restore, import
|
||||
|
||||
Flags:
|
||||
-f, --file string Path to an NDJSON dump (defaults to stdin)
|
||||
-h, --help help for restore
|
||||
Restore key/value pairs from an NDJSON dump
|
||||
|
||||
Usage:
|
||||
pda restore [DB] [flags]
|
||||
|
||||
Aliases:
|
||||
restore, import
|
||||
|
||||
Flags:
|
||||
-f, --file string Path to an NDJSON dump (defaults to stdin)
|
||||
-h, --help help for restore
|
||||
44
testdata/help__set__ok.ct
vendored
Normal file
44
testdata/help__set__ok.ct
vendored
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue