Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions lib/core/dsl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,6 @@ shellspec_begin() {
shellspec_output BEGIN
}

shellspec_execdir() {
case $1 in
@project | @project/*) set -- "${1#@project}" ;;
@basedir | @basedir/*)
set -- "$1" "/${SHELLSPEC_SPECFILE%/*}"
while [ "$2" ]; do
[ -e "${SHELLSPEC_PROJECT_ROOT%/}/$2/.shellspec" ] && break
[ -e "${SHELLSPEC_PROJECT_ROOT%/}/$2/.shellspec-basedir" ] && break
set -- "$1" "${2%/*}"
done
set -- "${2#/}${1#@basedir}"
;;
@specfile | @specfile/*) set -- "${SHELLSPEC_SPECFILE%/*}${1#@specfile}" ;;
*) set -- ""
esac
case $1 in
/*) set -- "$1" ;;
?*) set -- "/$1" ;;
esac
cd "${SHELLSPEC_PROJECT_ROOT%/}$1"
}

shellspec_perform() {
SHELLSPEC_ENABLED=$1 SHELLSPEC_FILTER=$2
}
Expand Down
22 changes: 22 additions & 0 deletions lib/general.sh
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,28 @@ shellspec_abspath_win() {
eval "$1=\"\${$1#/}\""
}

shellspec_execdir() {
case $1 in
@project | @project/*) set -- "${1#@project}" ;;
@basedir | @basedir/*)
set -- "$1" "/${SHELLSPEC_SPECFILE%/*}"
while [ "$2" ]; do
[ -e "${SHELLSPEC_PROJECT_ROOT%/}/$2/.shellspec" ] && break
[ -e "${SHELLSPEC_PROJECT_ROOT%/}/$2/.shellspec-basedir" ] && break
set -- "$1" "${2%/*}"
done
set -- "${2#/}${1#@basedir}"
;;
@specfile | @specfile/*) set -- "${SHELLSPEC_SPECFILE%/*}${1#@specfile}" ;;
*) set -- ""
esac
case $1 in
/*) set -- "$1" ;;
?*) set -- "/$1" ;;
esac
cd "${SHELLSPEC_PROJECT_ROOT%/}$1"
}

shellspec_mv() { "$SHELLSPEC_MV" "$@"; }
shellspec_rm() { "$SHELLSPEC_RM" "$@"; }
shellspec_chmod() { "$SHELLSPEC_CHMOD" "$@"; }
Expand Down
2 changes: 2 additions & 0 deletions lib/libexec/kcov-executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ executor() {

#shellcheck disable=SC2039,SC2086
(
shellspec_execdir "${SHELLSPEC_EXECDIR}"

"$SHELLSPEC_KCOV_PATH" \
$SHELLSPEC_KCOV_COMMON_OPTS \
$SHELLSPEC_KCOV_OPTS \
Expand Down