Skip to content

Commit

Permalink
create directories in test
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Feb 22, 2024
1 parent 65b47de commit 2f187ce
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions src/cutadapt/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ set -e

dir_in="$meta_resources_dir/test_data"

#############################################
mkdir test_simple_single_end
cd test_simple_single_end

echo "#############################################"
echo "> Run cutadapt on single-end data"
"$meta_executable" \
--report minimal \
Expand All @@ -23,8 +28,14 @@ echo ">> Check if output is empty"
[ -s "output-dir/1_R1_001.fastq" ] && echo "1_R1_001.fastq should be empty" && exit 1
[ ! -s "output-dir/unknown_R1_001.fastq" ] && echo "unkown_R1_001.fastq is empty" && exit 1

rm -r output-dir
cd ..
echo

#############################################
mkdir test_multiple_single_end
cd test_multiple_single_end

echo "#############################################"
echo "> Run with a combination of inputs"

echo ">adapter1" > adapters1.fasta
Expand Down Expand Up @@ -54,9 +65,14 @@ echo ">> Check if output is empty"
[ -s "output-dir/1_R1_001.fastq" ] && echo "1_R1_001.fastq should be empty" && exit 1
[ ! -s "output-dir/unknown_R1_001.fastq" ] && echo "unkown_R1_001.fastq is empty" && exit 1

rm -r output-dir
rm adapters?.fasta
cd ..
echo

#############################################
mkdir test_simple_paired_end
cd test_simple_paired_end

echo "#############################################"
echo "> Run cutadapt on paired-end data"
"$meta_executable" \
--report minimal \
Expand All @@ -83,7 +99,11 @@ echo ">> Check if output is empty"
[ ! -s "output-dir/unknown_R1_001.fastq" ] && echo "unkown_R1_001.fastq is empty" && exit 1
[ ! -s "output-dir/unknown_R2_001.fastq" ] && echo "unkown_R2_001.fastq is empty" && exit 1

rm -r output-dir
cd ..
echo

#############################################

echo "#############################################"
echo "> Test successful"

0 comments on commit 2f187ce

Please sign in to comment.