summaryrefslogtreecommitdiffstats
path: root/test-branches.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtest-branches.sh21
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