Skip to content
Snippets Groups Projects
Commit 7c27b53a authored by Salson Mikael's avatar Salson Mikael
Browse files

Tests: add tests for the CLI

parent cdb85ac5
No related branches found
No related tags found
No related merge requests found
Pipeline #416 failed
......@@ -17,9 +17,12 @@ build:
test:
stage: test
before_script:
- apt install -y zutils diffutils
script:
- cd tests
- ./test_bam
- ./test_read_file
- ./tests.sh
1 10
A 11
1 2 6 6
1 0 1 1
1 9 10 0
A 0 1 0
A 8 11 2
A 5 6 1
A 6 7 2
A 7 8 2
A 8 9 0
A 9 10 2
1 0 10 6
A 0 11 5
#!/bin/bash
set -e
INDEX=$(tempfile)
../coverind index -b $INDEX data/test1.bam
RESULTS=$(tempfile)
../coverind query -l -i $INDEX > $RESULTS
diff $RESULTS data/expected_list
(
../coverind query -i $INDEX -r 1:2-5
../coverind query -i $INDEX -r 1:0-0
../coverind query -i $INDEX -r 1:9-9
../coverind query -i $INDEX -r A:0-0
../coverind query -i $INDEX -r A:8-10
) > $RESULTS
diff $RESULTS data/expected_range
../coverind query -i $INDEX -b $RESULTS
diff <(zcat $RESULTS) data/expected_whole_bed
../coverind query -i $INDEX -b $RESULTS -w 1 -r A:5-9
diff <(zcat $RESULTS) data/expected_range_bed
rm -f $RESULTS $INDEX*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment