]>
Commit | Line | Data |
---|---|---|
5c2bd8b7 BW |
1 | #!/bin/sh |
2 | ||
3 | test_description='Test submodule--helper is-active | |
4 | ||
5 | This test verifies that `git submodue--helper is-active` correclty identifies | |
6 | submodules which are "active" and interesting to the user. | |
7 | ' | |
8 | ||
9 | . ./test-lib.sh | |
10 | ||
11 | test_expect_success 'setup' ' | |
12 | git init sub && | |
13 | test_commit -C sub initial && | |
14 | git init super && | |
15 | test_commit -C super initial && | |
16 | git -C super submodule add ../sub sub1 && | |
17 | git -C super submodule add ../sub sub2 && | |
18 | git -C super commit -a -m "add 2 submodules at sub{1,2}" | |
19 | ' | |
20 | ||
21 | test_expect_success 'is-active works with urls' ' | |
22 | git -C super submodule--helper is-active sub1 && | |
23 | git -C super submodule--helper is-active sub2 && | |
24 | ||
25 | git -C super config --unset submodule.sub1.URL && | |
26 | test_must_fail git -C super submodule--helper is-active sub1 && | |
27 | git -C super config submodule.sub1.URL ../sub && | |
28 | git -C super submodule--helper is-active sub1 | |
29 | ' | |
30 | ||
31 | test_done |