test for optional & multiple column select

showing that its currently not possible to select no column

and the same for a select with dynamic options (wo legal_values)
that shows that it works here
This commit is contained in:
Matthias Bernt
2021-12-16 09:55:12 +01:00
parent fc7fdcd4b1
commit defbfbe8cf
3 changed files with 69 additions and 0 deletions
@@ -0,0 +1,26 @@
<tool id="column_param_optional_ref" name="Column Param with optional ref" version="1.0.0" profile="20.01">
<command><![CDATA[
echo $col_opt > '$output1' &&
echo $col_mult_opt > '$output1'
]]></command>
<inputs>
<param name="input1" type="data" format="tabular" optional="true" label="Input 1" />
<!-- verify that it is possible to have an optional column parameter
an specify no options-->
<param name="col_opt" type="data_column" data_ref="input1" optional="true" label="Column to Use" />
<param name="col_mult_opt" type="data_column" data_ref="input1" multiple="true" optional="true" label="Column to Use" />
</inputs>
<outputs>
<data name="output1" format="tabular" />
</outputs>
<tests>
<test>
<output name="output1">
<assert_contents>
<has_line line="None" />
<has_line line="" />
</assert_contents>
</output>
</test>
</tests>
</tool>
@@ -121,7 +121,9 @@
<tool file="column_param.xml" />
<tool file="column_param_configfile.xml" />
<tool file="column_param_list.xml" />
<tool file="column_param_optional_ref.xml" />
<tool file="column_multi_param.xml" />
<tool file="select_optional.xml"/>
<tool file="hidden_param.xml" />
<tool file="special_params.xml" />
<tool file="section.xml" />
+41
View File
@@ -0,0 +1,41 @@
<tool id="select_optional" name="Optional select" version="1.0.0" profile="20.01">
<command><![CDATA[
echo $select_opt > '$output1' &&
echo $select_mult_opt
]]></command>
<inputs>
<!-- verify that it is possible to have an optional column parameter
an specify no options-->
<param name="select_opt" type="select" optional="true">
<options from_data_table="test_fasta_indexes">
<column name="value" index="0"/>
<column name="name" index="1"/>
<filter type="remove_value" value="hg18_value"/>
<filter type="remove_value" value="hg19_value"/>
<filter type="remove_value" value="mm10_value"/>
</options>
</param>
<param name="select_mult_opt" type="select" multiple="true" optional="true">
<options from_data_table="test_fasta_indexes">
<column name="value" index="0"/>
<column name="name" index="1"/>
<filter type="remove_value" value="hg18_value"/>
<filter type="remove_value" value="hg19_value"/>
<filter type="remove_value" value="mm10_value"/>
</options>
</param>
</inputs>
<outputs>
<data name="output1" format="tabular" />
</outputs>
<tests>
<test>
<output name="output1">
<assert_contents>
<has_line line="None" />
<has_line line="" />
</assert_contents>
</output>
</test>
</tests>
</tool>