Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added tools/unzip/test-data/input2.zip
Binary file not shown.
41 changes: 30 additions & 11 deletions tools/unzip/unzip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<macros>
<import>creators.xml</import>
<token name="@TOOL_VERSION@">6.0</token>
<token name="@VERSION_SUFFIX@">4</token>
<token name="@VERSION_SUFFIX@">5</token>
<token name="@PROFILE@">22.01</token>
<xml name="regex_sanitizer">
<sanitizer>
Expand Down Expand Up @@ -102,7 +102,7 @@
<filter>extract_options['target'] == 'single'</filter>
</data>
<collection name="unzipped" type="list" label="${tool.name} on ${on_string} all files as collection">
<discover_datasets directory="out" pattern="(?P&lt;designation&gt;\.*[^\.]+)\.?(?P&lt;ext&gt;.*)" visible="false" format="auto"/>
<discover_datasets directory="out" pattern="^(?P&lt;designation&gt;\.*[^\.]+(?:\.?(?P&lt;ext&gt;.*)))$" visible="false" format="auto"/>
<filter>extract_options['target'] != 'single'</filter>
</collection>
</outputs>
Expand All @@ -121,8 +121,8 @@
<param name="target" value="all"/>
</conditional>
<output_collection name="unzipped" type="list" count="2">
<element name="input" file="input.png" ftype="png" compare="sim_size"/>
<element name="res" file="res.tiff" ftype="tiff" compare="sim_size"/>
<element name="input.png" file="input.png" ftype="png" compare="sim_size"/>
<element name="res.tiff" file="res.tiff" ftype="tiff" compare="sim_size"/>
</output_collection>
</test>
<!-- Binary files without file extension -->
Expand All @@ -145,8 +145,8 @@
<output_collection name="unzipped" type="list" count="4">
<element name="binaries_yelp" file="yelp" compare="sim_size"/>
<element name="binaries_yes" file="yes" compare="sim_size"/>
<element name="images_input" file="input.png" ftype="png" compare="sim_size"/>
<element name="images_res" file="res.tiff" ftype="tiff" compare="sim_size"/>
<element name="images_input.png" file="input.png" ftype="png" compare="sim_size"/>
<element name="images_res.tiff" file="res.tiff" ftype="tiff" compare="sim_size"/>
</output_collection>
</test>
<test expect_num_outputs="1">
Expand All @@ -163,8 +163,8 @@
<param name="target" value="all"/>
</conditional>
<output_collection name="unzipped" type="list" count="2">
<element name="input" file="input.png" ftype="png" compare="sim_size"/>
<element name="res" file="res.tiff" ftype="tiff" compare="sim_size"/>
<element name="input.png" file="input.png" ftype="png" compare="sim_size"/>
<element name="res.tiff" file="res.tiff" ftype="tiff" compare="sim_size"/>
</output_collection>
</test>
<!-- ZIP containing dotfiles and non-dotfiles -->
Expand All @@ -184,7 +184,7 @@
<has_size value="0"/>
</assert_contents>
</element>
<element name="subdir_"><!-- The suffix `.dotfile` is recognized as the extension -->
<element name="subdir_.dotfile">
<assert_contents>
<has_size value="0"/>
</assert_contents>
Expand Down Expand Up @@ -222,8 +222,27 @@
<param name="keep_regex" value="./images/.*"/>
</conditional>
<output_collection name="unzipped" type="list" count="2">
<element name="images_input" file="input.png" ftype="png" compare="sim_size"/>
<element name="images_res" file="res.tiff" ftype="tiff" compare="sim_size"/>
<element name="images_input.png" file="input.png" ftype="png" compare="sim_size"/>
<element name="images_res.tiff" file="res.tiff" ftype="tiff" compare="sim_size"/>
</output_collection>
</test>
<!-- ZIP with two files with same stem name: https://github.com/BMCV/galaxy-image-analysis/issues/223 -->
<test expect_num_outputs="1">
<param name="input_file" value="input2.zip" ftype="zip"/>
<conditional name="extract_options">
<param name="target" value="all"/>
</conditional>
<output_collection name="unzipped" type="list" count="2">
<element name="input_file.tsv" ftype="tsv">
<assert_contents>
<has_line line="b"/>
</assert_contents>
</element>
<element name="input_file.txt" ftype="txt">
<assert_contents>
<has_line line="a"/>
</assert_contents>
</element>
</output_collection>
</test>
</tests>
Expand Down
Loading