Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / usr.bin / dialog / TESTS / yesno
1 #!/bin/sh
2 DIALOG=${DIALOG=/usr/bin/dialog}
3
4 $DIALOG --title "YES/NO BOX" --clear \
5         --hline "Press F1 or ? to see GNU GPL" \
6         --hfile ../COPYING \
7         --yesno "Hi, this is a yes/no dialog box. You can use this to ask \
8                  questions that have an answer of either yes or no. \
9                  BTW, do you notice that long lines will be automatically \
10                  wrapped around so that they can fit in the box? You can \
11                  also control line breaking explicitly by inserting \
12                  'backslash n' at any place you like, but in this case, \
13                  auto wrap around will be disabled and you will have to \
14                  control line breaking yourself." 15 61
15
16 case $? in
17   0)
18     echo "Yes chosen.";;
19   1)
20     echo "No chosen.";;
21   255)
22     echo "ESC pressed.";;
23 esac