X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib-core;h=4550b9ec9d091b3b8d798c24b62576da521745ef;hp=7ed27619ac3466b9a2900519412a53006cb709ad;hb=2a2b0931f9b29bf372136451d317eb81649424e2;hpb=2c3427f71978357151e84611d967c1650aa814dc diff --git a/tests/lib-core b/tests/lib-core index 7ed27619..4550b9ec 100644 --- a/tests/lib-core +++ b/tests/lib-core @@ -8,10 +8,15 @@ fail () { t-set-intree () { if [ "x$DGIT_TEST_INTREE" = x ]; then return; fi : ${DGIT_TEST:=$DGIT_TEST_INTREE/dgit} + : ${DGIT_BADCOMMIT_FIXUP:=$DGIT_TEST_INTREE/dgit-badcommit-fixup} : ${DGIT_REPOS_SERVER_TEST:=$DGIT_TEST_INTREE/infra/dgit-repos-server} : ${DGIT_SSH_DISPATCH_TEST:=$DGIT_TEST_INTREE/infra/dgit-ssh-dispatch} : ${DGIT_INFRA_PFX:=$DGIT_TEST_INTREE${DGIT_TEST_INTREE:+/infra/}} - export DGIT_TEST DGIT_REPOS_SERVER_TEST DGIT_SSH_DISPATCH_TEST + : ${DGIT_GITDEBREBASE_TEST:=$DGIT_TEST_INTREE/git-debrebase} + : ${DGIT_MANPAGES_SOURCE_DIR:=$DGIT_TEST_INTREE} + export DGIT_TEST DGIT_BADCOMMIT_FIXUP + export DGIT_REPOS_SERVER_TEST DGIT_SSH_DISPATCH_TEST + export DGIT_MANPAGES_SOURCE_DIR export PERLLIB="$DGIT_TEST_INTREE${PERLLIB:+:}${PERLLIB}" } @@ -20,12 +25,14 @@ t-set-using-tmp () { export DGIT_TEST_DUMMY_DIR=$tmp export DGIT_TEST_TMP=$tmp export GNUPGHOME=$tmp/nonexistent + export DEBFULLNAME='dgit test git user' git config --global user.email 'dgit-test@debian.example.net' - git config --global user.name 'dgit test git user' + git config --global user.name "$DEBFULLNAME" + git config --global protocol.ext.allow always } t-filter-out-git-hyphen-dir () { - local pathent=$(type -p git-rev-parse ||:) + local pathent; pathent=$(type -p git-rev-parse ||:) case "$pathent" in '') return ;; esac pathent=${pathent%/*} local path=":$PATH:" @@ -34,3 +41,7 @@ t-filter-out-git-hyphen-dir () { path="${path%:}" PATH="$path" } + +t-sort () { + LC_COLLATE=C sort "$@" +}