Skip to content

Commit

Permalink
update modules and add tests for #150
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Nov 28, 2022
1 parent de4d75e commit 11fbe54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -8,7 +8,7 @@ require (
github.com/brentp/bix v0.0.0-20190718140914-00aa7a7f205d
github.com/brentp/goluaez v0.0.0-20160116211227-dd35d08e32e7
github.com/brentp/irelate v0.0.1
github.com/brentp/vcfgo v0.0.0-20220919165057-adf3b5d20c55
github.com/brentp/vcfgo v0.0.0-20221128230736-759c0d32541e
github.com/brentp/xopen v0.0.0-20181116180855-111b45cadc7d
github.com/pkg/errors v0.9.1 // indirect
github.com/yuin/gluare v0.0.0-20170607022532-d7c94f1a80ed // indirect
Expand Down
9 changes: 8 additions & 1 deletion tests/functional-test.sh
Expand Up @@ -7,7 +7,10 @@ test -e ssshtest || wget -q https://raw.githubusercontent.com/ryanlayer/ssshtest
set -o nounset


go install -race -a github.com/brentp/vcfanno
go build -race -a
export PATH=.:$PATH
echo using $(which vcfanno)


run check_self_number vcfanno -base-path tests/data/ -lua example/custom.lua tests/data/number.conf tests/data/number-input.vcf
assert_equal 0 $(grep -c "lua error in postannotation" $STDERR_FILE)
Expand All @@ -24,6 +27,10 @@ assert_equal 6 $(grep ^# $STDOUT_FILE | grep -c lua)
# so lua_start doesn't exist.
assert_equal 3 $(grep -c "not found in" $STDERR_FILE)
run check_samples vcfanno -base-path tests/citest/ tests/citest/conf.toml tests/citest/test.vcf
n=$(grep -c ^#CHROM $STDOUT_FILE)
assert_equal $n 1
run check_ends vcfanno -ends -lua example/custom.lua example/conf.toml example/query.vcf.gz
n=$(grep -v ^# $STDOUT_FILE | grep -c right_)
assert_equal $(( $n > 0 )) 1
Expand Down

0 comments on commit 11fbe54

Please sign in to comment.