From 5245975f67212fdae08033e13c0c7d2b6db1256e Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 13 Jul 2020 18:26:21 -0400 Subject: Update test code --- tests/test_split.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_split.sh b/tests/test_split.sh index 13ec5a9..562876a 100644 --- a/tests/test_split.sh +++ b/tests/test_split.sh @@ -1,7 +1,7 @@ test_splitfits_data1() { local datafile - datafile=$(get_data generic/fits/sample.fits) + datafile=$(nexus_raw_download repository/generic/fits/sample.fits) [[ ! -f ${datafile} ]] && return 1 if ! ${test_program} -o ${test_case} ${datafile}; then @@ -14,7 +14,7 @@ test_splitfits_data1() { test_splitfits_combine_data1() { local datafile - datafile=$(get_data generic/fits/sample.fits) + datafile=$(nexus_raw_download repository/generic/fits/sample.fits) [[ ! -f ${datafile} ]] && return 1 if ! ${test_program} -o ${test_case} ${datafile}; then -- cgit From 8225c761bb911d2c970cb73ba7b527a1002a22db Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 13 Jul 2020 22:49:34 -0400 Subject: Fail if output is different --- tests/test_split.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/test_split.sh b/tests/test_split.sh index 562876a..45d9abd 100644 --- a/tests/test_split.sh +++ b/tests/test_split.sh @@ -8,6 +8,11 @@ test_splitfits_data1() { return 1 fi + find . -regex '.*\.part_[0-9]+' | xargs -I'{}' cat '{}' >> streamed.fits + if ! diff ${datafile} streamed.fits; then + return 1 + fi + return 0 } -- cgit From 67b69cd38f0f15078bf832e91f7e4196649ffcfe Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 13 Jul 2020 23:07:57 -0400 Subject: Version sort on find output --- tests/test_split.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_split.sh b/tests/test_split.sh index 45d9abd..c049d18 100644 --- a/tests/test_split.sh +++ b/tests/test_split.sh @@ -8,8 +8,10 @@ test_splitfits_data1() { return 1 fi - find . -regex '.*\.part_[0-9]+' | xargs -I'{}' cat '{}' >> streamed.fits - if ! diff ${datafile} streamed.fits; then + files=$(find . -regex '.*\.part_[0-9]+' | sort -V) + cat $files > streamed.fits + + if ! diff -q ${datafile} streamed.fits; then return 1 fi -- cgit