mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
* Mostly finish pytest to Bats conversion * Add Bats version note to testing docs * Move Bats CI check to separate job
25 lines
600 B
Bash
25 lines
600 B
Bash
# shellcheck shell=bash
|
|
|
|
source "$BATS_TEST_DIRNAME/../vendor/bats-all/load.bash"
|
|
|
|
test_util.setup_file() {
|
|
cd "$BATS_FILE_TMPDIR"
|
|
|
|
export GIT_CONFIG_NOSYSTEM=1
|
|
export GIT_CONFIG_GLOBAL="$PWD/git_config"
|
|
|
|
# Append to path so that we can access all commands included from git-extras
|
|
# TODO: This currently breaks with commands that are included in "not_needed_git_repo" etc.
|
|
PATH="$BATS_TEST_DIRNAME/../bin:$PATH"
|
|
}
|
|
|
|
test_util.cd_test() {
|
|
cd "$BATS_TEST_TMPDIR"
|
|
}
|
|
|
|
test_util.git_init() {
|
|
git init --initial-branch main
|
|
git config user.name 'Name'
|
|
git config user.email 'name@example.com'
|
|
}
|