Skip to content

Commit 84854b2

Browse files
mvzadmorgan
authored andcommitted
Do not depend on main repo for status tests
1 parent aa416e4 commit 84854b2

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

test/status.t

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,44 @@ source test/setup
66

77
use Test::More
88

9+
clone-foo-and-bar
10+
11+
(
12+
cd $OWNER/foo
13+
git subrepo clone ../../../$UPSTREAM/bar
14+
git subrepo clone ../../../$UPSTREAM/foo bar/foo
15+
mkdir lib
16+
git subrepo clone ../../../$UPSTREAM/bar lib/bar
17+
git subrepo clone ../../../$UPSTREAM/foo lib/bar/foo
18+
) &> /dev/null || die
19+
920
{
10-
output=$(git subrepo status)
21+
output=$(
22+
cd $OWNER/foo
23+
git subrepo status
24+
)
1125

1226
like "$output" "2 subrepos:" \
1327
"'status' intro ok"
1428

15-
like "$output" "Git subrepo 'ext/bashplus':" \
16-
"ext/bashplus is in 'status'"
29+
like "$output" "Git subrepo 'bar':" \
30+
"bar is in 'status'"
1731

18-
like "$output" "Git subrepo 'ext/test-more-bash':" \
19-
"ext/test-more-bash is in 'status'"
32+
like "$output" "Git subrepo 'lib/bar':" \
33+
"lib/bar is in 'status'"
2034

21-
unlike "$output" "Git subrepo 'ext/test-more-bash/ext/bashplus':" \
22-
"ext/test-more-bash/ext/bashplus is not in 'status'"
35+
unlike "$output" "Git subrepo 'bar/foo':" \
36+
"bar/foo is not in 'status'"
2337

24-
unlike "$output" "Git subrepo 'ext/test-more-bash/ext/test-tap-bash':" \
25-
"ext/test-more-bash/ext/test-tap-bash is not in 'status'"
38+
unlike "$output" "Git subrepo 'lib/bar/foo':" \
39+
"lib/bar/foo is not in 'status'"
2640
}
2741

2842
{
29-
output=$(git subrepo status --ALL)
43+
output=$(
44+
cd $OWNER/foo
45+
git subrepo status --all-recursive
46+
)
3047

3148
like "$output" "4 subrepos:" \
3249
"'status --ALL' intro ok"

0 commit comments

Comments
 (0)