forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow non-optional integer/float params without
value
attribute
Previously a tool with such an input would fail to load. Add test tool.
- Loading branch information
Showing
2 changed files
with
33 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<tool id="integer_default" name="Test integer default" version="0.1.0"> | ||
<command><![CDATA[ | ||
echo ${int($input1) + int($input2) + int($input3)} > '$out_file1' | ||
]]></command> | ||
<inputs> | ||
<param name="input1" type="integer" value="0" label="Integer with default 0" /> | ||
<param name="input2" type="integer" value="" label="Integer with default empty string" /> | ||
<!-- Not needed any more to have `value=""` when there is no good default --> | ||
<param name="input3" type="integer" label="Integer with no default value" /> | ||
</inputs> | ||
<outputs> | ||
<data name="out_file1" format="txt"/> | ||
</outputs> | ||
<tests> | ||
<test> | ||
<param name="input1" value="1" /> | ||
<param name="input2" value="2" /> | ||
<param name="input3" value="3" /> | ||
<output name="out_file1"> | ||
<assert_contents> | ||
<has_line line="6" /> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
<!-- Test that it fails if a non-optional integer param is not set --> | ||
<test expect_failure="true"> | ||
<param name="input1" value="1" /> | ||
<param name="input2" value="2" /> | ||
</test> | ||
</tests> | ||
<help> | ||
</help> | ||
</tool> |