From: Pete Wyckoff Date: Sat, 11 Aug 2012 16:55:00 +0000 (-0400) Subject: git p4 test: move client_view() function to library X-Git-Tag: v1.8.0-rc0~100^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d2018293ca604544a79cd9390953ef0272a65078;p=git.git git p4 test: move client_view() function to library This code will be useful in --detect-branches --use-client-spec tests. Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh index 2d753ab7e..d748c36df 100644 --- a/t/lib-git-p4.sh +++ b/t/lib-git-p4.sh @@ -115,3 +115,20 @@ marshal_dump() { EOF "$PYTHON_PATH" "$TRASH_DIRECTORY/marshal-dump.py" } + +# +# Construct a client with this list of View lines +# +client_view() { + ( + cat <<-EOF && + Client: client + Description: client + Root: $cli + View: + EOF + for arg ; do + printf "\t$arg\n" + done + ) | p4 client -i +} diff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh index 7d993ef80..281be2917 100755 --- a/t/t9809-git-p4-client-view.sh +++ b/t/t9809-git-p4-client-view.sh @@ -8,23 +8,6 @@ test_expect_success 'start p4d' ' start_p4d ' -# -# Construct a client with this list of View lines -# -client_view() { - ( - cat <<-EOF && - Client: client - Description: client - Root: $cli - View: - EOF - for arg ; do - printf "\t$arg\n" - done - ) | p4 client -i -} - # # Verify these files exist, exactly. Caller creates # a list of files in file "files".