Skip to content

Commit d201829

Browse files
Pete Wyckoffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 61b472e commit d201829

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

t/lib-git-p4.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,20 @@ marshal_dump() {
115115
EOF
116116
"$PYTHON_PATH" "$TRASH_DIRECTORY/marshal-dump.py"
117117
}
118+
119+
#
120+
# Construct a client with this list of View lines
121+
#
122+
client_view() {
123+
(
124+
cat <<-EOF &&
125+
Client: client
126+
Description: client
127+
Root: $cli
128+
View:
129+
EOF
130+
for arg ; do
131+
printf "\t$arg\n"
132+
done
133+
) | p4 client -i
134+
}

t/t9809-git-p4-client-view.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,6 @@ test_expect_success 'start p4d' '
88
start_p4d
99
'
1010

11-
#
12-
# Construct a client with this list of View lines
13-
#
14-
client_view() {
15-
(
16-
cat <<-EOF &&
17-
Client: client
18-
Description: client
19-
Root: $cli
20-
View:
21-
EOF
22-
for arg ; do
23-
printf "\t$arg\n"
24-
done
25-
) | p4 client -i
26-
}
27-
2811
#
2912
# Verify these files exist, exactly. Caller creates
3013
# a list of files in file "files".

0 commit comments

Comments
 (0)