summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2010-07-23 12:03:07 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-07-23 14:42:36 -0700
commit800f11040dec4efc4d94206869d9004b23dd700a (patch)
treeea9cce556f27a45b8be7006bdd83fec13538c85a /t/test-lib.sh
parentGit 1.7.2 (diff)
downloadtgif-800f11040dec4efc4d94206869d9004b23dd700a.tar.xz
t4150 (am): style fix
Place setup commands in test_expect_success blocks. This makes the rare event of the setup commands breaking on some platform easier to diagnose, and more importantly, it visually distinguishes where each test begins and ends. Instead of running test -z against the result of "git diff" command substitution, use "git diff --exit-code", to improve output when running with the "-v" option. Use test_cmp in place of "test $(foo) = $(bar)" for similar reasons. Remove whitespace after the > and < redirection operators for consistency with other tests. The order of arguments to test_cmp is "test_cmp expected actual". Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index e5523dd690..cb15798d17 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -257,6 +257,10 @@ q_to_cr () {
tr Q '\015'
}
+q_to_tab () {
+ tr Q '\011'
+}
+
append_cr () {
sed -e 's/$/Q/' | tr Q '\015'
}