Code

diff --stat: use a maximum of 5/8 for the filename part
[git.git] / t / test-lib.sh
index a65dfc7ea93b3ec95e6ab7cd5b758029fe599d22..a089a188641f47a24e9018d852a3089aaf47d345 100644 (file)
@@ -381,11 +381,20 @@ test_config () {
        git config "$@"
 }
 
+
 test_config_global () {
        test_when_finished "test_unconfig --global '$1'" &&
        git config --global "$@"
 }
 
+write_script () {
+       {
+               echo "#!${2-"$SHELL_PATH"}" &&
+               cat
+       } >"$1" &&
+       chmod +x "$1"
+}
+
 # Use test_set_prereq to tell that a particular prerequisite is available.
 # The prerequisite can later be checked for in two ways:
 #