Skip to content

Commit

Permalink
Added one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaspe committed Jul 24, 2024
1 parent 258a9e6 commit 1260e24
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fastqc/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ argument_groups:
direction: output
multiple: true
description: |
Create the HTML report of the results.
Create the HTML report of the results.
'*' wild card must be provided in the output file name.
example: input_fastqc.html

- name: --zip
Expand All @@ -36,6 +37,7 @@ argument_groups:
multiple: true
description: |
Create the zip file(s) containing: html report, data, images, icons, summary, etc.
'*' wild card must be provided in the output file name.
example: input_fastqc.zip

- name: Options
Expand Down
27 changes: 27 additions & 0 deletions src/fastqc/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,33 @@ rm "test_data/input_1_fastqc.zip"

echo "- test succeeded -"

# Test 6: Run fastqc with output options
echo "-> Run Test: output options"
"$meta_executable" \
--input "test_data/input_1.fq" \
--html "test_data/output_*_.html" \
--zip "test_data/output_*_.zip"

# Check if the html file was generated
[ ! -f "test_data/output_input_1_.html" ] \
&& echo "Output HTML file not found." && exit 1

# Check if the zip file was generated
[ ! -f "test_data/output_input_1_.zip" ] \
&& echo "Output ZIP file not found." && exit 1

# Check if the files are empty
[ ! -s "test_data/output_input_1_.html" ] \
&& echo "Output HTML file is empty." && exit 1

[ ! -s "test_data/output_input_1_.zip" ] \
&& echo "Output ZIP file is empty." && exit 1

rm "test_data/output_input_1_.html"
rm "test_data/output_input_1_.zip"

echo "- test succeeded -"


echo "All tests succeeded!"
exit 0

0 comments on commit 1260e24

Please sign in to comment.