diff options
author | Michael Allen <michael@michaelallen.io> | 2015-03-09 11:06:44 +0000 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-03-09 11:06:44 +0000 |
commit | 38dcfefff66da011a474fa95f96f71a8ae905a5b (patch) | |
tree | 14180bc7a9db9d30b5baa09957fcc2e84a404943 /test-branches.sh | |
parent | 0472c724b11f89365aa0ef86fa794f367c7372f7 (diff) | |
download | git-sonar-38dcfefff66da011a474fa95f96f71a8ae905a5b.tar.gz git-sonar-38dcfefff66da011a474fa95f96f71a8ae905a5b.zip |
ensure remote_branch_name is fails quietly
Diffstat (limited to '')
-rwxr-xr-x | test-branches.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test-branches.sh b/test-branches.sh index 4ed7957..40c5a50 100755 --- a/test-branches.sh +++ b/test-branches.sh @@ -78,4 +78,25 @@ test_branch_name_returns_error() { rm_tmp } +test_remote_branch_name_quiet_when_not_in_repo() { + cd_to_tmp + + debug_output="$( + { + set -x + output="$( + remote_branch_name; + )" + set +x + } 2>&1 + echo "$output" + )" + + usages="$(echo "$debug_output" | grep 'fatal: ' | wc -l)" + + assertEquals " 0" "$usages" + + rm_tmp +} + . ./shunit/shunit2 |