Skip to content

Commit

Permalink
adds test for najoshi#32
Browse files Browse the repository at this point in the history
  • Loading branch information
wookietreiber committed Aug 13, 2014
1 parent 8ae84f4 commit 80c85ff
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TESTS = sickle-se-success.sh sickle-pe-success.sh sickle-pe-memcheck.sh sickle-se-memcheck.sh
TESTS = sickle-se-success.sh sickle-pe-success.sh sickle-pe-memcheck.sh sickle-se-memcheck.sh segfault-on-empty-reads.sh

EXTRA_DIST = $(TESTS) test.fastq test.f.fastq test.r.fastq
EXTRA_DIST = $(TESTS) test.fastq test.f.fastq test.r.fastq segfault-on-empty-reads-1.fastq segfault-on-empty-reads-2.fastq

TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = bash -x
8 changes: 8 additions & 0 deletions test/segfault-on-empty-reads-1.fastq
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@HISEQ:140:H9N47ADXX:1:1101:1200:2194 1:N:0:TCCTGAGCTATCCTCT
TATCAACGCAGAGTAC
+
8??DDD86:F1??AEF
@HISEQ:140:H9N47ADXX:1:1101:1596:2197 1:N:0:TCCTGAGCTATCCTCT
TATCAACGCAGAGTAC
+
CCCFFFFFHHGHHHGH
8 changes: 8 additions & 0 deletions test/segfault-on-empty-reads-2.fastq
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@HISEQ:140:H9N47ADXX:1:1101:1200:2194 2:N:0:TCCTGAGCTATCCTCT

+

@HISEQ:140:H9N47ADXX:1:1101:1596:2197 2:N:0:TCCTGAGCTATCCTCT
GTGGAAACAACACAGAGATCACCTTGCCCC
+
0-(-(:)8>?8((<(:)).9>7><?);>?<
15 changes: 15 additions & 0 deletions test/segfault-on-empty-reads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

FILE_O=$(mktemp)
FILE_P=$(mktemp)
FILE_S=$(mktemp)

trap "rm -f $FILE_O $FILE_P $FILE_S" EXIT

../src/sickle pe \
-t illumina \
-f "$(dirname "$0")"/segfault-on-empty-reads-1.fastq \
-r "$(dirname "$0")"/segfault-on-empty-reads-2.fastq \
-o $FILE_O \
-p $FILE_P \
-s $FILE_S

0 comments on commit 80c85ff

Please sign in to comment.