Merge branch 'sg/complete-symmetric-diff'
[gitweb.git] / t / test-lib.sh
index 9e74357b4ff68cd0ced531a017bf94d716d5ddb7..f4c1e04e4f26ca38b57fc6c47b05cf92111107b6 100644 (file)
@@ -70,6 +70,9 @@ unset GIT_NOTES_REF
 unset GIT_NOTES_DISPLAY_REF
 unset GIT_NOTES_REWRITE_REF
 unset GIT_NOTES_REWRITE_MODE
+unset GIT_REFLOG_ACTION
+unset GIT_CHERRY_PICK_HELP
+unset GIT_QUIET
 GIT_MERGE_VERBOSITY=5
 export GIT_MERGE_VERBOSITY
 export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
@@ -260,7 +263,7 @@ test_decode_color () {
                        if (n == 47) return "BWHITE";
                }
                {
-                       while (match($0, /\x1b\[[0-9;]*m/) != 0) {
+                       while (match($0, /\033\[[0-9;]*m/) != 0) {
                                printf "%s<", substr($0, 1, RSTART-1);
                                codes = substr($0, RSTART+2, RLENGTH-3);
                                if (length(codes) == 0)
@@ -1061,7 +1064,6 @@ case $(uname -s) in
        ;;
 *CYGWIN*)
        test_set_prereq POSIXPERM
-       test_set_prereq BSLASHPSPEC
        test_set_prereq EXECKEEPSPID
        test_set_prereq NOT_MINGW
        test_set_prereq SED_STRIPS_CR
@@ -1077,6 +1079,15 @@ esac
 test -z "$NO_PERL" && test_set_prereq PERL
 test -z "$NO_PYTHON" && test_set_prereq PYTHON
 
+# Can we rely on git's output in the C locale?
+if test -n "$GETTEXT_POISON"
+then
+       GIT_GETTEXT_POISON=YesPlease
+       export GIT_GETTEXT_POISON
+else
+       test_set_prereq C_LOCALE_OUTPUT
+fi
+
 # test whether the filesystem supports symbolic links
 ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
 rm -f y