diff --git a/test/install.bats b/test/install.bats index a507822580..b51b6f5576 100644 --- a/test/install.bats +++ b/test/install.bats @@ -13,9 +13,10 @@ setup() { } @test "install.sh creates a valid installation, and uninstall.sh undos it" { - run "$PATH_TO_INSTALL_SHELL" "$INSTALL_DIR" + run "$PATH_TO_INSTALL_SHELL" "$INSTALL_DIR" "$BATS_LIBDIR" [ "$status" -eq 0 ] [ "$output" == "Installed Bats to $INSTALL_DIR/bin/bats" ] + ls -lr "$INSTALL_DIR" [ -x "$INSTALL_DIR/bin/bats" ] [ -x "$INSTALL_DIR/$BATS_LIBDIR/bats-core/formatter.bash" ] [ -x "$INSTALL_DIR/$BATS_LIBDIR/bats-core/preprocessing.bash" ] diff --git a/test/root.bats b/test/root.bats index 555a0515c1..2a703427ed 100644 --- a/test/root.bats +++ b/test/root.bats @@ -19,9 +19,10 @@ setup() { # give each test their own tmpdir to allow for parallelization without interference # shellcheck disable=SC2103,SC2164 cd "$BATS_TEST_TMPDIR" + PATH_TO_INSTALL_SHELL="${BATS_TEST_DIRNAME%/*}/install.sh" mkdir -p {usr/bin,opt/bats-core} ls -lR . - "$BATS_ROOT/install.sh" "opt/bats-core" + "$PATH_TO_INSTALL_SHELL" "opt/bats-core" ln -s "usr/bin" "bin"