Files
galaxy/test/functional/tools/select_from_csvdataset.xml
T
Matthias Bernt d642ce34c8 fix startswith attribute of <options>
as documented in the xsd

in addition fix https://github.com/galaxyproject/galaxy/issues/14324,
i.e. document the `separator` attribute of options

also doc that only 1MB is used and lines starting with `#` are always
ignored
2022-07-14 14:19:40 +02:00

40 lines
1.5 KiB
XML

<tool id="select_from_csvdataset" name="select_from_csvdataset" version="0.1.0">
<description>Create dynamic options from CSV data sets</description>
<command><![CDATA[
echo select_single '$select_single' > '$output'
]]></command>
<inputs>
<param name="single" type="data" format="csv" label="single"/>
<param name="select_single" type="select" label="select_single">
<options from_dataset="single" separator="," startswith="Transaction_date">
<column name="name" index="1"/>
<column name="value" index="2"/>
<validator type="no_options" message="No data is available in single" />
</options>
</param>
</inputs>
<outputs>
<data name="output" format="txt" />
</outputs>
<tests>
<!-- test that csv can be selected, i.e. if the separator attribute of <options> works-->
<test>
<param name="single" value="1.csv" />
<param name="select_single" value="Product1" />
<output name="output">
<assert_contents>
<has_text text="select_single 1200" />
</assert_contents>
</output>
</test>
<!-- test that data from "comment" lines can not be selected, i.e. if the startswith attribute of <options> works-->
<test expect_failure="true">
<param name="single" value="1.csv" />
<param name="select_single" value="Product" />
</test>
</tests>
<help>
</help>
</tool>