Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix certain aspects of dataset reductions in conditionals/repeats.
For instance, fixes #3859 restoring the correct ``element_identifier`` for reduces collections in conditionals. Add tests for combinations of repeats and conditionals.
- Loading branch information
Showing
5 changed files
with
138 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
test/functional/tools/identifier_multiple_in_conditional.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<tool id="identifier_multiple_in_conditional" name="identifier_multiple_in_conditional"> | ||
<command><![CDATA[ | ||
#for $input in $outer_cond.inner_cond.input1# | ||
echo '$input.element_identifier' >> 'output1'; | ||
#end for# | ||
]]></command> | ||
<inputs> | ||
<conditional name="outer_cond"> | ||
<param name="cond_param_outer" type="boolean" checked="true" /> | ||
<when value="true"> | ||
<conditional name="inner_cond"> | ||
<param name="cond_param_inner" type="boolean" checked="true" /> | ||
<when value="true"> | ||
<param type="data" name="input1" label="True Input" multiple="true" /> | ||
</when> | ||
</conditional> | ||
</when> | ||
</conditional> | ||
</inputs> | ||
<outputs> | ||
<data name="output1" format="tabular" from_work_dir="output1" /> | ||
</outputs> | ||
<tests> | ||
</tests> | ||
</tool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<tool id="identifier_multiple_in_repeat" name="identifier_multiple_in_repeat"> | ||
<command><![CDATA[ | ||
#for $repeat_instance in $the_repeat# | ||
#for $input in $repeat_instance.the_data.input1# | ||
echo '$input.element_identifier' >> 'output1'; | ||
#end for# | ||
#end for# | ||
]]></command> | ||
<inputs> | ||
<repeat name="the_repeat" title="Repeat Inputs"> | ||
<conditional name="the_data"> | ||
<param name="cond_param" type="boolean" /> | ||
<when value="true"> | ||
<param type="data" name="input1" label="True Input" multiple="true" /> | ||
</when> | ||
<when value="false"> | ||
<param type="data" name="input1" label="False Input" multiple="true" /> | ||
</when> | ||
</conditional> | ||
</repeat> | ||
</inputs> | ||
<outputs> | ||
<data name="output1" format="tabular" from_work_dir="output1" /> | ||
</outputs> | ||
<tests> | ||
</tests> | ||
</tool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters