You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
test_description='git-p4 options'
|
|
|
|
|
|
|
|
. ./lib-git-p4.sh
|
|
|
|
|
|
|
|
test_expect_success 'start p4d' '
|
|
|
|
start_p4d
|
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'init depot' '
|
|
|
|
(
|
|
|
|
cd "$cli" &&
|
|
|
|
echo file1 >file1 &&
|
|
|
|
p4 add file1 &&
|
|
|
|
p4 submit -d "change 1" &&
|
|
|
|
echo file2 >file2 &&
|
|
|
|
p4 add file2 &&
|
|
|
|
p4 submit -d "change 2" &&
|
|
|
|
echo file3 >file3 &&
|
|
|
|
p4 add file3 &&
|
|
|
|
p4 submit -d "change 3"
|
|
|
|
)
|
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'clone no --git-dir' '
|
|
|
|
test_must_fail "$GITP4" clone --git-dir=xx //depot
|
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'clone --branch' '
|
|
|
|
"$GITP4" clone --branch=refs/remotes/p4/sb --dest="$git" //depot &&
|
|
|
|
test_when_finished cleanup_git &&
|
|
|
|
(
|
|
|
|
cd "$git" &&
|
|
|
|
git ls-files >files &&
|
|
|
|
test_line_count = 0 files &&
|
|
|
|
test_path_is_file .git/refs/remotes/p4/sb
|
|
|
|
)
|
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'kill p4d' '
|
|
|
|
kill_p4d
|
|
|
|
'
|
|
|
|
|
|
|
|
test_done
|