t5552: suppress upload-pack trace output
[gitweb.git] / t / t7005-editor.sh
index 5257f4d261c2060b881d2649034232f76f4ed9b7..b2ca77b3384c97954991eae9c5af89c4d8d8035e 100755 (executable)
@@ -13,7 +13,7 @@ test_expect_success 'determine default editor' '
 
 '
 
-if ! expr "$vi" : '^[a-z]*$' >/dev/null
+if ! expr "$vi" : '[a-z]*$' >/dev/null
 then
        vi=
 fi
@@ -38,7 +38,7 @@ test_expect_success setup '
        test_commit "$msg" &&
        echo "$msg" >expect &&
        git show -s --format=%s > actual &&
-       diff actual expect
+       test_cmp expect actual
 
 '
 
@@ -85,7 +85,7 @@ do
                git --exec-path=. commit --amend &&
                git show -s --pretty=oneline |
                sed -e "s/^[0-9a-f]* //" >actual &&
-               diff actual expect
+               test_cmp expect actual
        '
 done
 
@@ -107,18 +107,12 @@ do
                git --exec-path=. commit --amend &&
                git show -s --pretty=oneline |
                sed -e "s/^[0-9a-f]* //" >actual &&
-               diff actual expect
+               test_cmp expect actual
        '
 done
 
-if ! echo 'echo space > "$1"' > "e space.sh"
-then
-       say "Skipping; FS does not support spaces in filenames"
-       test_done
-fi
-
 test_expect_success 'editor with a space' '
-
+       echo "echo space >\$1" >"e space.sh" &&
        chmod a+x "e space.sh" &&
        GIT_EDITOR="./e\ space.sh" git commit --amend &&
        test space = "$(git show -s --pretty=format:%s)"