diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-02-26 13:37:09 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-26 13:37:09 -0800 |
commit | ae2f25542ffdd1919b33c8f274f8172e49d64dbf (patch) | |
tree | 0ab622542d3787b56ac6aae7b9d4f3977a701e7a /t/t5505-remote.sh | |
parent | 56f37fda511e1615dc6df86c68f3b841711a7828 (diff) | |
parent | a31eeae27f38246ba35000fa603d884cdd1a81ae (diff) | |
download | git-ae2f25542ffdd1919b33c8f274f8172e49d64dbf.tar.gz git-ae2f25542ffdd1919b33c8f274f8172e49d64dbf.tar.xz |
Merge branch 'tg/git-remote'
The internal API to interact with "remote.*" configuration
variables has been streamlined.
* tg/git-remote:
remote: use remote_is_configured() for add and rename
remote: actually check if remote exits
remote: simplify remote_is_configured()
remote: use parse_config_key
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-x | t/t5505-remote.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 0dcc75207..949725e9b 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -144,6 +144,39 @@ test_expect_success 'remove remote protects local branches' ' ) ' +test_expect_success 'remove errors out early when deleting non-existent branch' ' + ( + cd test && + echo "fatal: No such remote: foo" >expect && + test_must_fail git remote rm foo 2>actual && + test_i18ncmp expect actual + ) +' + +test_expect_success 'rename errors out early when deleting non-existent branch' ' + ( + cd test && + echo "fatal: No such remote: foo" >expect && + test_must_fail git remote rename foo bar 2>actual && + test_i18ncmp expect actual + ) +' + +test_expect_success 'add existing foreign_vcs remote' ' + test_config remote.foo.vcs bar && + echo "fatal: remote foo already exists." >expect && + test_must_fail git remote add foo bar 2>actual && + test_i18ncmp expect actual +' + +test_expect_success 'add existing foreign_vcs remote' ' + test_config remote.foo.vcs bar && + test_config remote.bar.vcs bar && + echo "fatal: remote bar already exists." >expect && + test_must_fail git remote rename foo bar 2>actual && + test_i18ncmp expect actual +' + cat >test/expect <<EOF * remote origin Fetch URL: $(pwd)/one |