mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2025-02-02 11:58:28 +00:00
Add regression tests
This commit is contained in:
parent
eb57899162
commit
36f5ed8729
36
extras/test/40_regression.sh
Normal file
36
extras/test/40_regression.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
export test_description="Tomb regression tests"
|
||||
|
||||
source ./setup
|
||||
|
||||
TOMB_VERSION=("2.3")
|
||||
for version in "${TOMB_VERSION[@]}"; do
|
||||
URL="https://files.dyne.org/tomb/old-releases/Tomb-$version.tar.gz"
|
||||
|
||||
curl "$URL" > "$TMP/tomb-regression.tar.gz"
|
||||
mkdir -p "$TMP/tomb-regression"
|
||||
tar xfz "$TMP/tomb-regression.tar.gz" \
|
||||
--strip-components 1 -C "$TMP/tomb-regression"
|
||||
T="$TMP/tomb-regression/tomb"
|
||||
[[ "$version" == "$(${T} -v |& awk 'NR==1 {print $3}')" ]] || continue
|
||||
|
||||
test_export "regression_$version"
|
||||
test_expect_success "Regression tests: opening old tomb ($version) with Tomb" "
|
||||
tt_dig -s 20 &&
|
||||
tt_forge --tomb-pwd $DUMMYPASS &&
|
||||
tt_lock --tomb-pwd $DUMMYPASS &&
|
||||
T='$TOMB_BIN' &&
|
||||
tt_open --tomb-pwd $DUMMYPASS &&
|
||||
tt_close
|
||||
"
|
||||
|
||||
test_export "test" # Using already generated tomb
|
||||
test_expect_success "Regression tests: opening new tomb with Tomb $version" "
|
||||
export T='$TMP/tomb-regression/tomb' &&
|
||||
tt_open --tomb-pwd $DUMMYPASS &&
|
||||
tt_close
|
||||
"
|
||||
done
|
||||
|
||||
test_done
|
Loading…
x
Reference in New Issue
Block a user