From 11370b4f6253a52ef55e9de6d1b0a0b8f2c11516 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Tue, 30 Jul 2024 10:44:34 +0200 Subject: [PATCH] add test script --- src/agat/agat_convert_embl2gff/test.sh | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/agat/agat_convert_embl2gff/test.sh diff --git a/src/agat/agat_convert_embl2gff/test.sh b/src/agat/agat_convert_embl2gff/test.sh new file mode 100644 index 00000000..843c2f14 --- /dev/null +++ b/src/agat/agat_convert_embl2gff/test.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +## VIASH START +## VIASH END + +test_dir="${meta_resources_dir}/test_data" +out_dir="${meta_resources_dir}/out_data" + +echo "> Run $meta_name with test data" +"$meta_executable" \ + --embl "$test_dir/agat_convert_embl2gff_1.embl" \ + --output "$out_dir/output.gff" + +echo ">> Checking output" +[ ! -f "output.gff" ] && echo "Output file output.gtf does not exist" && exit 1 + +echo ">> Check if output is empty" +[ ! -s "output.gff" ] && echo "Output file output.gtf is empty" && exit 1 + +echo ">> Check if output matches expected output" +diff "$out_dir/output.gff" "$test_dir/agat_convert_embl2gff_1.gff" +if [ $? -ne 0 ]; then + echo "Output file output.gff does not match expected output" + exit 1 +fi + +echo "> Test successful" \ No newline at end of file