mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-12-22 02:40:16 +02:00
tests: simplify ZDOTDIR setup, remove base
This makes it easier to run tests without providing ZDOTDIR.
This commit is contained in:
parent
016426207c
commit
b92462ff2d
@ -1,12 +1,12 @@
|
||||
language: generic
|
||||
sudo: false
|
||||
env:
|
||||
- ZSH=4 ZDOTDIR=tests/ZDOTDIR
|
||||
- ZSH=4
|
||||
- ZSH=4 ZDOTDIR=tests/ZDOTDIR.clobber
|
||||
- ZSH=4 ZDOTDIR=tests/ZDOTDIR.invalid-module_path
|
||||
- ZSH=4 ZDOTDIR=tests/ZDOTDIR.loadviafunction
|
||||
|
||||
- ZSH=5 ZDOTDIR=tests/ZDOTDIR
|
||||
- ZSH=5
|
||||
- ZSH=5 ZDOTDIR=tests/ZDOTDIR.clobber
|
||||
- ZSH=5 ZDOTDIR=tests/ZDOTDIR.invalid-module_path
|
||||
- ZSH=5 ZDOTDIR=tests/ZDOTDIR.loadviafunction
|
||||
|
4
Makefile
4
Makefile
@ -1,5 +1,5 @@
|
||||
# Default, can be overridden using "make test ZDOTDIR=...".
|
||||
ZDOTDIR:=${CURDIR}/tests/ZDOTDIR
|
||||
# Empty by default, can be overridden using "make test ZDOTDIR=…".
|
||||
ZDOTDIR:=
|
||||
# Make it absolute.
|
||||
override ZDOTDIR:=$(abspath $(ZDOTDIR))
|
||||
|
||||
|
@ -1,4 +1 @@
|
||||
# Source base setup.
|
||||
source ${ZDOTDIR}/../ZDOTDIR/.zshenv
|
||||
|
||||
setopt noclobber
|
||||
|
@ -9,6 +9,3 @@ module_path=(/dev/null)
|
||||
zstat() {
|
||||
echo "Should not get called."
|
||||
}
|
||||
|
||||
# Source base setup.
|
||||
source ${ZDOTDIR}/../ZDOTDIR/.zshenv
|
||||
|
@ -1,6 +1,3 @@
|
||||
# Source base setup.
|
||||
source ${ZDOTDIR}/../ZDOTDIR/.zshenv
|
||||
|
||||
antigen-like-loader-function() {
|
||||
source "$TESTDIR/../autoenv.plugin.zsh"
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
# Source base setup.
|
||||
source ${ZDOTDIR}/../ZDOTDIR/.zshenv
|
||||
|
||||
setopt shwordsplit
|
@ -1,3 +0,0 @@
|
||||
# Base setup/config.
|
||||
|
||||
TEST_SOURCE_AUTOENV=(source $TESTDIR/../autoenv.plugin.zsh)
|
@ -15,7 +15,10 @@ export AUTOENV_AUTH_FILE="$CRAMTMP/autoenv/.autoenv_auth"
|
||||
_save_errexit=${options[errexit]}
|
||||
set -e
|
||||
|
||||
# Defined in .zshenv, e.g. tests/ZDOTDIR/.zshenv.
|
||||
# Can be defined in .zshenv, e.g. tests/ZDOTDIR.loadviafunction/.zshenv.
|
||||
if [[ -z $TEST_SOURCE_AUTOENV ]]; then
|
||||
TEST_SOURCE_AUTOENV=(source $TESTDIR/../autoenv.plugin.zsh)
|
||||
fi
|
||||
$TEST_SOURCE_AUTOENV
|
||||
|
||||
# Reset any authentication.
|
||||
|
Loading…
Reference in New Issue
Block a user