Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MaraBesemer committed Dec 1, 2024
1 parent 82d87da commit d914de7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
1 change: 0 additions & 1 deletion tools/phyloseq/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<requirement type="package" version="@TOOL_VERSION@">bioconductor-phyloseq</requirement>
<requirement type="package" version="1.7.3">r-optparse</requirement>
<requirement type="package" version="2.0.0">r-tidyverse</requirement>
<requirement type="package" version="3.3.0">r-ggplot2</requirement>
</requirements>
</xml>
<xml name="phyloseq_input">
Expand Down
24 changes: 23 additions & 1 deletion tools/phyloseq/phyloseq_plot_bar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Rscript '${__tool_directory__}/phyloseq_plot_bar.R'
<outputs>
<data name="output" format="pdf" label="Bar Chart (PDF)" />
</outputs>
<tests>
<tests>
<!-- Test 1: Default parameters -->
<test>
<param name="input" value="output.phyloseq" ftype="phyloseq"/>
<param name="x" value="Property"/>
Expand All @@ -35,6 +36,27 @@ Rscript '${__tool_directory__}/phyloseq_plot_bar.R'
</assert_contents>
</output>
</test>
<!-- Test 2: Empty parameters (invalid) -->
<test>
<param name="input" value="output.phyloseq" ftype="phyloseq"/>
<param name="x" value=""/>
<param name="fill" value=""/>
<param name="facet" value=""/>
<expect_exit_code>1</expect_exit_code>
</test>
<!-- Test 3: Different parameter combination -->
<test>
<param name="input" value="output.phyloseq" ftype="phyloseq"/>
<param name="x" value="Number"/>
<param name="fill" value="Property"/>
<param name="facet" value=""/>
<output name="output" ftype="pdf">
<assert_contents>
<has_text text="%PDF"/>
<has_text text="%%EOF"/>
</assert_contents>
</output>
</test>
</tests>
<help>
**Description**
Expand Down

0 comments on commit d914de7

Please sign in to comment.