From 655c817402ee54fd42f2106423648450e6b1c8cd Mon Sep 17 00:00:00 2001 From: ruihan Date: Fri, 30 Oct 2026 11:12:07 -0300 Subject: [PATCH] test(recovery): run the documented download without libraries --- tests/test_recovery_download.bats | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/test_recovery_download.bats diff --git a/tests/test_recovery_download.bats b/tests/test_recovery_download.bats new file mode 100644 index 0000000..a159645 --- /dev/null +++ b/tests/test_recovery_download.bats @@ -0,0 +1,13 @@ +#!/usr/bin/env bats + +@test "Recovery download runs without a library directory" { + local repo="$BATS_TEST_DIRNAME/.." artifact target="$BATS_TEST_TMPDIR/recovery" + artifact=$(sed -n 's|^curl -L https://raw.githubusercontent.com/mateussiqueira/unleash/main/\([^ ]*\) -o /tmp/unleash$|\1|p' "$repo/README.md") + [ -n "$artifact" ] + mkdir -p "$target" + cp "$repo/$artifact" "$target/unleash" + run env HOME="$target" XDG_CONFIG_HOME="$target/config" bash "$target/unleash" version + [ "$status" -eq 0 ] + [[ "$output" == *"unleash"* ]] + [ ! -d "$target/lib" ] +}