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/03-Shared_GUI.t | |
parent | 4a289bab3a58b417acec862db0ac68176582b640 (diff) | |
download | manatools-c3bfd51e5d52af523d039f8612be0058b01f9335.tar manatools-c3bfd51e5d52af523d039f8612be0058b01f9335.tar.gz manatools-c3bfd51e5d52af523d039f8612be0058b01f9335.tar.bz2 manatools-c3bfd51e5d52af523d039f8612be0058b01f9335.tar.xz manatools-c3bfd51e5d52af523d039f8612be0058b01f9335.zip |
Added select_fromList, a dialog to get a selection from a list of items
Diffstat (limited to 't/03-Shared_GUI.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 1a781cb4..695a4196 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', |