diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-02-28 15:59:24 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-02-28 15:59:24 +0100 |
commit | 7c7e9e1d48e4185bae53a3a4fbc967d59186c932 (patch) | |
tree | cb65e34e01203c245906807f202e7e964337be39 /tests/test-menus.sh | |
parent | 7cc05b89cbe71455d5ea3859341908b3af451baa (diff) |
fixes in menu testing
Diffstat (limited to 'tests/test-menus.sh')
-rwxr-xr-x[-rw-r--r--] | tests/test-menus.sh | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/tests/test-menus.sh b/tests/test-menus.sh index 4d0bd25..b8dd99c 100644..100755 --- a/tests/test-menus.sh +++ b/tests/test-menus.sh @@ -1,18 +1,15 @@ basedir=$(dirname "`dirname $0`") source $basedir/src/core/libs/lib-ui.sh -ANSWER="/tmp/.dialog-answer" - - -var_UI_TYPE=dia -ask_option no 'menu title is this yes yes' 'extra explanation is here mkay OPTIONAL' optional tagA itemA "tag B" 'item B' tag-c item\ C -echo "return code was $?" - -ask_option no 'menu title is this yes yes' 'extra explanation is here mkay REQUIRED' required tagA itemA "tag B" 'item B' tag-c item\ C -echo "return code was $?" - -var_UI_TYPE=cli -ask_option tag-c 'menu title is this yes yes' 'extra explanation is here mkay OPTIONAL' optional tagA itemA "tag B" 'item B' tag-c item\ C -echo "return code was $?" - -ask_option tag-c 'menu title is this yes yes' 'extra explanation is here mkay REQUIRED' required tagA itemA "tag B" 'item B' tag-c item\ C -echo "return code was $?" +ANSWER="/tmp/aif-test-dialog-answer" +for ui in dia cli +do + for type in required optional + do + for default in no tag-c + do + var_UI_TYPE=$ui + ask_option $default 'menu title ($2)' 'extra explanation ($3)'" settings: type: $type, default:$default" $type tagA itemA "tag B" 'item B' tag-c item\ C + notify "RETURN CODE: $?\nANSWER: $ANSWER_OPTION" + done + done +done |