homeshick/test-helper.patch
Olav Reinert 97d68041bf Accepting request 1087294 from home:oreinert:branches:utilities
- Upgrade to version 2.0.1:
  * Improvements to testing (@oreinert)
  * Test up to and including bash v5.2.9
  * Improvements to cd and check subcommands (@me-and)
  * Improvement to cd subcommand in fish (@languitar)
- Remove patch git-config-for-tests.patch:
  * Included by upstream
- Add patch test-helper.patch:
  * Allows tests to run on OBS; does not alter package contents

OBS-URL: https://build.opensuse.org/request/show/1087294
OBS-URL: https://build.opensuse.org/package/show/utilities/homeshick?expand=0&rev=21
2023-05-15 21:15:21 +00:00

25 lines
684 B
Diff

--- homeshick-2.0.1/test/helper.sh.orig 2023-05-13 19:53:54.462114112 +0200
+++ homeshick-2.0.1/test/helper.sh 2023-05-13 20:10:46.242708858 +0200
@@ -16,8 +16,10 @@
}
determine_homeshick_dir() {
- HOMESHICK_DIR=$(cd "$BATS_TEST_DIRNAME/../.." && echo "$PWD")
- export HOMESHICK_DIR
+ if [ -z "$HOMESHICK_DIR" ]; then
+ HOMESHICK_DIR=$(cd "$BATS_TEST_DIRNAME/../.." && echo "$PWD")
+ export HOMESHICK_DIR
+ fi
}
create_test_dir() {
@@ -67,7 +69,7 @@
local name=$1
if [[ ! -e "$REPO_FIXTURES/$name" ]]; then
# shellcheck disable=SC1090
- source "$HOMESHICK_DIR/test/fixtures/$name.sh"
+ source "$HOMESHICK_TEST_DIR/test/fixtures/$name.sh"
fi
}