mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
63 lines
2.1 KiB
XML
63 lines
2.1 KiB
XML
<tool id="job_properties" name="Test Job Properties">
|
|
<command>
|
|
#if $thebool
|
|
echo "The bool is true";
|
|
echo "The bool is really true" 1>&2;
|
|
echo "This is a line of text." > $out_file1
|
|
#else
|
|
echo "The bool is not true";
|
|
echo "The bool is very not true" 1>&2;
|
|
echo "This is a different line of text." > $out_file1;
|
|
sh -c "exit 2"
|
|
#end if
|
|
#if $failbool
|
|
; sh -c "exit 127"
|
|
#end if
|
|
|
|
</command>
|
|
<inputs>
|
|
<param name="thebool" type="boolean" label="The boolean property" />
|
|
<param name="failbool" type="boolean" label="The failure property" checked="false" />
|
|
</inputs>
|
|
<outputs>
|
|
<data name="out_file1" />
|
|
</outputs>
|
|
<stdio>
|
|
<exit_code range="127" level="fatal" description="Failing exit code." />
|
|
</stdio>
|
|
<tests>
|
|
<test expect_exit_code="0">
|
|
<param name="thebool" value="true" />
|
|
<output name="out_file1" file="simple_line.txt" />
|
|
<assert_command>
|
|
<has_text text="really" />
|
|
</assert_command>
|
|
<assert_stdout>
|
|
<has_line line="The bool is true" />
|
|
</assert_stdout>
|
|
<assert_stderr>
|
|
<has_line line="The bool is really true" />
|
|
</assert_stderr>
|
|
</test>
|
|
<test expect_exit_code="2">
|
|
<param name="thebool" value="false" />
|
|
<output name="out_file1" file="simple_line_alternative.txt" />
|
|
<assert_command>
|
|
<has_text text="very not" />
|
|
</assert_command>
|
|
<assert_stdout>
|
|
<has_line line="The bool is not true" />
|
|
</assert_stdout>
|
|
<assert_stderr>
|
|
<has_line line="The bool is very not true" />
|
|
</assert_stderr>
|
|
</test>
|
|
<test expect_exit_coded="127" expect_failure="true">
|
|
<param name="thebool" value="true" />
|
|
<param name="failbool" value="true" />
|
|
</test>
|
|
</tests>
|
|
<help>
|
|
</help>
|
|
</tool>
|