From 11fbe54ec78c86e98e0a6bb3e394759e01bfac3e Mon Sep 17 00:00:00 2001 From: Brent Pedersen Date: Mon, 28 Nov 2022 15:30:05 -0800 Subject: [PATCH] update modules and add tests for #150 --- go.mod | 2 +- tests/functional-test.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 2717f14..dd630de 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/tests/functional-test.sh b/tests/functional-test.sh index 7608e8c..308b976 100755 --- a/tests/functional-test.sh +++ b/tests/functional-test.sh @@ -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) @@ -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