diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-01-08 16:10:50 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-01-08 16:10:50 +0100 |
commit | c3bfd51e5d52af523d039f8612be0058b01f9335 (patch) | |
tree | 65c591f48a8ae1ed0189e9a6000b686d344f6ada /t | |
parent | 4a289bab3a58b417acec862db0ac68176582b640 (diff) | |
download | colin-keep-c3bfd51e5d52af523d039f8612be0058b01f9335.tar colin-keep-c3bfd51e5d52af523d039f8612be0058b01f9335.tar.gz colin-keep-c3bfd51e5d52af523d039f8612be0058b01f9335.tar.bz2 colin-keep-c3bfd51e5d52af523d039f8612be0058b01f9335.tar.xz colin-keep-c3bfd51e5d52af523d039f8612be0058b01f9335.zip |
Added select_fromList, a dialog to get a selection from a list of items
Diffstat (limited to 't')
-rw-r--r-- | t/03-Shared_GUI.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/03-Shared_GUI.t b/t/03-Shared_GUI.t index 1a781cb..695a419 100644 --- a/t/03-Shared_GUI.t +++ b/t/03-Shared_GUI.t @@ -39,6 +39,22 @@ SKIP: { }), 'ask_fromList'); diag "ask_fromList got: < " . ($item ? $item : "none") . " >"; + ok(my $selection = $gui->select_fromList({ + title => "Select from list", + header => { + text_column => "Items", + check_column => "selected", + }, + list => [ + { text => 'item 1', checked => 1}, + { text => 'item 2', }, + { text => 'item 3', checked => 0}, + { text => 'item 4', checked => 1}, + { text => 'item 5',}, + ], + }), 'select_fromList'); + diag "select_fromList got: < " . join(' - ', @${selection}) . " >"; + #TODO cancel makes this test failing ok($item = $gui->ask_fromTreeList({title => "Choose from list", header => "Which one do you select? [default is leaf 2]", default_button => 1, default_item => 'leaf 2', |