fedhub/async-git/tests/test-0001-init.sh

20 lines
364 B
Bash
Raw Permalink Normal View History

2020-04-22 03:13:53 +00:00
set -e
. helper.sh
TEST_NAME=test-0001-init
function check_initial_layout {
# does it actually create the required directories?
file_exists "$1/HEAD"
dir_exists "$1/refs"
}
# does git init work without failing?
get_temp_name $TEST_NAME
$GIT_PATH init $temp_dir
if [ ! $? ]; then
error "git init failed"
fi
check_initial_layout "$temp_dir/.git"