test: add default gum commands without any flags as test cases

This commit is contained in:
Maas Lalani 2022-08-11 18:14:37 -04:00
parent 4cb290e596
commit 5d24ca88f4
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -1,8 +1,8 @@
#!/bin/sh
# Choose
gum choose Choose One Item --cursor "* " --cursor.foreground 99 --selected.foreground 99
gum choose Foo Bar Baz
gum choose Choose One Item --cursor "* " --cursor.foreground 99 --selected.foreground 99
gum choose Pick Two Items Maximum --limit 2 --cursor "* " --cursor-prefix "(•) " --selected-prefix "(x) " --unselected-prefix "( ) " --cursor.foreground 99 --selected.foreground 99
gum choose Unlimited Choice Of Items --no-limit --cursor "* " --cursor-prefix "(•) " --selected-prefix "(x) " --unselected-prefix "( ) " --cursor.foreground 99 --selected.foreground 99
@ -11,6 +11,7 @@ gum confirm "Testing?"
gum confirm "No?" --default=false --affirmative "Okay." --negative "Cancel."
# Filter
gum filter
echo {1..500} | sed 's/ /\n/g' | gum filter
echo {1..500} | sed 's/ /\n/g' | gum filter --indicator ">" --placeholder "Pick a number..." --indicator.foreground 1 --text.foreground 2 --match.foreground 3 --prompt.foreground 4 --height 5
@ -21,6 +22,7 @@ echo ":candy:" | gum format -t emoji
echo '{{ Bold "Bold" }}' | gum format -t template
# Input
gum input
gum input --prompt "Email: " --placeholder "john@doe.com" --prompt.foreground 99 --cursor.foreground 99 --width 50
gum input --password --prompt "Password: " --placeholder "hunter2" --prompt.foreground 99 --cursor.foreground 99 --width 50
@ -29,6 +31,7 @@ gum join "Horizontal" "Join"
gum join --vertical "Vertical" "Join"
# Spin
gum spin -- sleep 1
gum spin --spinner minidot --title "Loading..." --title.foreground 99 -- sleep 1
gum spin --show-output --spinner monkey --title "Loading..." --title.foreground 99 -- sh -c 'sleep 1; echo "Hello, Gum!"'
@ -36,4 +39,5 @@ gum spin --show-output --spinner monkey --title "Loading..." --title.foreground
gum style --foreground 99 --border double --border-foreground 99 --padding "1 2" --margin 1 "Hello, Gum."
# Write
gum write
gum write --width 40 --height 3 --placeholder "Type whatever you want" --prompt "| " --show-cursor-line --show-line-numbers --value "Something..." --base.padding 1 --cursor.foreground 99 --prompt.foreground 99