2016-03-24 00:18:33 +00:00
|
|
|
load common
|
|
|
|
load_fixtures
|
|
|
|
|
|
|
|
@test "Default YADM_DIR" {
|
|
|
|
echo "
|
|
|
|
YADM_DIR should default to \$HOME/.yadm
|
|
|
|
"
|
|
|
|
|
2016-04-06 17:33:42 +00:00
|
|
|
# shellcheck source=/dev/null
|
|
|
|
|
2016-03-24 00:18:33 +00:00
|
|
|
#; load yadm functions
|
2016-04-06 17:33:42 +00:00
|
|
|
YADM_TEST=1 source "$T_YADM"
|
2016-03-24 00:18:33 +00:00
|
|
|
|
|
|
|
#; test value of YADM_DIR
|
|
|
|
[ "$HOME/.yadm" = "$YADM_DIR" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "Override default YADM_DIR" {
|
|
|
|
echo "
|
|
|
|
Override YADM_DIR using -Y $T_DIR_YADM
|
|
|
|
YADM_DIR should become $T_DIR_YADM
|
|
|
|
"
|
|
|
|
|
2016-04-06 17:33:42 +00:00
|
|
|
# shellcheck source=/dev/null
|
|
|
|
|
2016-03-24 00:18:33 +00:00
|
|
|
#; load yadm functions
|
2016-04-06 17:33:42 +00:00
|
|
|
YADM_TEST=1 source "$T_YADM"
|
2016-03-24 00:18:33 +00:00
|
|
|
|
|
|
|
#; call process_global_args() with -Y
|
|
|
|
TEST_ARGS=(-Y $T_DIR_YADM)
|
2016-04-06 17:33:42 +00:00
|
|
|
process_global_args "${TEST_ARGS[@]}"
|
2016-03-24 00:18:33 +00:00
|
|
|
|
|
|
|
#; test value of YADM_DIR
|
|
|
|
[ "$T_DIR_YADM" = "$YADM_DIR" ]
|
|
|
|
}
|