-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgx.tests.sh
executable file
·44 lines (30 loc) · 904 Bytes
/
gx.tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
###################
# START TEST MODE #
###################
gx_print_title_1 "${GX_PARAMS_GX_TITLE}" testing
gx_print_question_yes_no "Would you like to run the tests"
if [ "${_GX_PRINT_QUESTION_YES_NO_LAST_VALUE}" != "${GX_PARAMS_YES}" ]; then
gx_print_step "Abort tests"
return
fi
# shellcheck disable=SC2034
GX_ENV_TEST=1
alias git="gx_test_fake_git"
source ~/git-xtended/src/test/test.sh
source ~/git-xtended/gx.sh
source ~/git-xtended/tests/test.tests.sh
source ~/git-xtended/tests/commands.tests.sh
source ~/git-xtended/tests/colors.tests.sh
source ~/git-xtended/tests/prompt.tests.sh
source ~/git-xtended/tests/git.tests.sh
source ~/git-xtended/tests/bash.tests.sh
source ~/git-xtended/tests/utils.tests.sh
gx_test_run "$1"
unalias git
unset GX_ENV_TEST
#
# FINISH TEST MODE
#
gx_print_step "Reload original ${GX_PARAMS_GX_TITLE}!"
source ~/git-xtended/gx.sh