1
0
Fork 0
mirror of synced 2024-07-13 20:39:58 -04:00

Add tests for stashed conflicting data during clone (#44)

This commit is contained in:
Tim Byrne 2017-01-20 16:31:51 -06:00
parent ce4ed41f10
commit 02107c35d9
No known key found for this signature in database
GPG key ID: 6CBE24C2FD8CF76E

View file

@ -176,4 +176,20 @@ setup() {
local remote_output
remote_output=$(GIT_DIR="$T_DIR_REPO" git remote show)
[ "$remote_output" = "origin" ]
#; confirm yadm repo is clean
cd "$T_DIR_WORK" ||:
clean_status=$("${T_YADM_Y[@]}" status -uno --porcelain)
echo "clean_status:'$clean_status'"
[ -z "$clean_status" ]
#; confirm conflicts are stashed
existing_stash=$("${T_YADM_Y[@]}" stash list)
echo "existing_stash:'$existing_stash'"
[[ "$existing_stash" =~ Conflicts\ preserved ]]
stashed_conflicts=$("${T_YADM_Y[@]}" stash show -p)
echo "stashed_conflicts:'$stashed_conflicts'"
[[ "$stashed_conflicts" =~ \+conflict ]]
}