diff options
author | Christian Schneider | 2007-11-23 13:08:17 +0000 |
---|---|---|
committer | Christian Schneider | 2007-11-23 13:08:17 +0000 |
commit | 7c9349e23f337e818c7f6fb922a54360515ac0d2 (patch) | |
tree | b0c3e25500e989f9d409613fff66a01c067bdfd0 /tests | |
parent | 0780b6b2ca8a9450c5e8038f889460ee45b6a039 (diff) | |
download | itools-7c9349e23f337e818c7f6fb922a54360515ac0d2.tar.gz itools-7c9349e23f337e818c7f6fb922a54360515ac0d2.tar.bz2 itools-7c9349e23f337e818c7f6fb922a54360515ac0d2.zip |
Only split selected options on comma for multi-select
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/it_html.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/it_html.t b/tests/it_html.t index e87df48..b560ed1 100755 --- a/tests/it_html.t +++ b/tests/it_html.t @@ -38,6 +38,18 @@ is( "link tag with data" ); +is( + it::replace('\n+\s*' => "", select('name' => "gna", 'multiple' => true, '1:foo,2:bar', '1,2')), + '<select name="gna" multiple><option value="1" selected>foo</option><option value="2" selected>bar</option></select>', + "select tag with multiselect", +); + +is( + it::replace('\n+\s*' => "", select('name' => "gna", array("1" => "foo", "2" => 'bar', '1,2' => "qux"), '1,2')), + '<select name="gna"><option value="1">foo</option><option value="2">bar</option><option value="1,2" selected>qux</option></select>', + "link tag without multiselect", +); + # XML generation unset($GLOBALS['it_html']); new it_html(array('htmltype' => "xhtml", 'tags' => "xmltest")); |