diff options
author | ache <ache@FreeBSD.org> | 1994-10-11 23:52:16 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-10-11 23:52:16 +0000 |
commit | 3ebb08f891f2cccb2f29dba63294a8316fd4f9e0 (patch) | |
tree | 1ed5beec27e231fe00e0a2297c0a009d20b799c1 /gnu | |
parent | fa8dd76764a5d7854f28e613d6b83f7050ba6751 (diff) | |
download | FreeBSD-src-3ebb08f891f2cccb2f29dba63294a8316fd4f9e0.zip FreeBSD-src-3ebb08f891f2cccb2f29dba63294a8316fd4f9e0.tar.gz |
Output error diagnostics, if occurse.
Add radiolist test.
Diffstat (limited to 'gnu')
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/checklist | 1 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/inputbox | 1 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/menubox | 1 | ||||
-rwxr-xr-x | gnu/usr.bin/dialog/TESTS/radiolist | 33 |
4 files changed, 36 insertions, 0 deletions
diff --git a/gnu/usr.bin/dialog/TESTS/checklist b/gnu/usr.bin/dialog/TESTS/checklist index 38fdc35..1d84516 100755 --- a/gnu/usr.bin/dialog/TESTS/checklist +++ b/gnu/usr.bin/dialog/TESTS/checklist @@ -28,5 +28,6 @@ case $retval in 1) echo "Cancel pressed.";; 255) + [ -z "$choice" ] || echo $choice ; echo "ESC pressed.";; esac diff --git a/gnu/usr.bin/dialog/TESTS/inputbox b/gnu/usr.bin/dialog/TESTS/inputbox index 67f2b25..902798f 100755 --- a/gnu/usr.bin/dialog/TESTS/inputbox +++ b/gnu/usr.bin/dialog/TESTS/inputbox @@ -23,5 +23,6 @@ case $retval in 1) echo "Cancel pressed.";; 255) + [ -z "$input" ] || echo $input ; echo "ESC pressed.";; esac diff --git a/gnu/usr.bin/dialog/TESTS/menubox b/gnu/usr.bin/dialog/TESTS/menubox index 4883c7c..d7a2276 100755 --- a/gnu/usr.bin/dialog/TESTS/menubox +++ b/gnu/usr.bin/dialog/TESTS/menubox @@ -29,5 +29,6 @@ case $retval in 1) echo "Cancel pressed.";; 255) + [ -z "$choice" ] || echo $choice ; echo "ESC pressed.";; esac diff --git a/gnu/usr.bin/dialog/TESTS/radiolist b/gnu/usr.bin/dialog/TESTS/radiolist new file mode 100755 index 0000000..16f3a23 --- /dev/null +++ b/gnu/usr.bin/dialog/TESTS/radiolist @@ -0,0 +1,33 @@ +#!/bin/sh +DIALOG=${DIALOG=/usr/bin/dialog} + +$DIALOG --title "RADIOLIST BOX" --clear \ + --radiolist "Hi, this is a radiolist box. You can use this to \n\ +present a list of choices, one of them can be turned \n\ +on or off. If there are more items than can fit on the \n\ +screen, the list will be scrolled. You can use the \n\ +UP/DOWN arrow keys, the first letter of the choice as a \n\ +hot key, or the number keys 1-9 to choose an option. \n\ +Press SPACE to toggle an option on/off. \n\n\ + Which of the following are fruits?" 20 61 5 \ + "Apple" "It's an apple." off \ + "Dog" "No, that's not my dog." ON \ + "Orange" "Yeah, that's juicy." off \ + "Cat" "No, never put a dog and a cat together!" oFF \ + "Fish" "Cats like fish." OFF \ + "Lemon" "You know how it tastes." oFF 2> /tmp/radiolist.tmp.$$ + +retval=$? + +choice=`cat /tmp/radiolist.tmp.$$` +rm -f /tmp/radiolist.tmp.$$ + +case $retval in + 0) + echo "'$choice' chosen.";; + 1) + echo "Cancel pressed.";; + 255) + [ -z "$choice" ] || echo $choice ; + echo "ESC pressed.";; +esac |