1
0
Fork 0
mirror of synced 2024-12-13 02:45:45 -05:00

Fix tests that set local.hostname (#59)

This commit is contained in:
Tim Byrne 2017-03-31 07:49:52 -05:00
parent c053481c21
commit fda2da6a5b
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12
3 changed files with 6 additions and 6 deletions

View file

@ -143,12 +143,12 @@ setup() {
#; write local attributes #; write local attributes
build_repo build_repo
for loption in class os host user; do for loption in class os hostname user; do
GIT_DIR="$T_DIR_REPO" git config "local.$loption" "custom_$loption" GIT_DIR="$T_DIR_REPO" git config "local.$loption" "custom_$loption"
done done
#; run config #; run config
for loption in class os host user; do for loption in class os hostname user; do
run "${T_YADM_Y[@]}" config "local.$loption" run "${T_YADM_Y[@]}" config "local.$loption"
#; validate status and output #; validate status and output
[ $status -eq 0 ] [ $status -eq 0 ]
@ -176,7 +176,7 @@ setup() {
local linecount local linecount
expected="[local]\n" expected="[local]\n"
linecount=1 linecount=1
for loption in class os host user; do for loption in class os hostname user; do
#; update expected #; update expected
expected="$expected\t$loption = custom_$loption\n" expected="$expected\t$loption = custom_$loption\n"
((linecount+=1)) ((linecount+=1))

View file

@ -379,13 +379,13 @@ function test_alt() {
echo " echo "
When the command 'alt' is provided When the command 'alt' is provided
and file matches only ##SYSTEM.HOST and file matches only ##SYSTEM.HOST
after setting local.host after setting local.hostname
Report the linking Report the linking
Verify correct file is linked Verify correct file is linked
Exit with 0 Exit with 0
" "
GIT_DIR="$T_DIR_REPO" git config local.host custom_host GIT_DIR="$T_DIR_REPO" git config local.hostname custom_host
test_alt 'override_host' 'false' '' test_alt 'override_host' 'false' ''
} }

View file

@ -169,7 +169,7 @@ function test_alt() {
GIT_DIR="$T_DIR_REPO" git config local.os custom_system GIT_DIR="$T_DIR_REPO" git config local.os custom_system
GIT_DIR="$T_DIR_REPO" git config local.user custom_user GIT_DIR="$T_DIR_REPO" git config local.user custom_user
GIT_DIR="$T_DIR_REPO" git config local.host custom_host GIT_DIR="$T_DIR_REPO" git config local.hostname custom_host
GIT_DIR="$T_DIR_REPO" git config local.class custom_class GIT_DIR="$T_DIR_REPO" git config local.class custom_class
test_alt 'override_all' 'false' '' test_alt 'override_all' 'false' ''
} }