From 7c7e9e1d48e4185bae53a3a4fbc967d59186c932 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 28 Feb 2009 15:59:24 +0100 Subject: fixes in menu testing --- tests/test-menus.sh | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) mode change 100644 => 100755 tests/test-menus.sh diff --git a/tests/test-menus.sh b/tests/test-menus.sh old mode 100644 new mode 100755 index 4d0bd25..b8dd99c --- 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 -- cgit v1.2.3-54-g00ecf