completion: consolidate test_completion*() tests
[gitweb.git] / t / lib-rebase.sh
index 2d922ae43cdaac23392f92d5b9b0470b1056b363..6ccf7970916b58748aedcce7e583eed2dee782d3 100644 (file)
@@ -27,7 +27,7 @@ set_fake_editor () {
 case "$1" in
 */COMMIT_EDITMSG)
        test -z "$EXPECT_HEADER_COUNT" ||
-               test "$EXPECT_HEADER_COUNT" = $(sed -n '1s/^# This is a combination of \(.*\) commits\./\1/p' < "$1") ||
+               test "$EXPECT_HEADER_COUNT" = "$(sed -n '1s/^# This is a combination of \(.*\) commits\./\1/p' < "$1")" ||
                exit
        test -z "$FAKE_COMMIT_MESSAGE" || echo "$FAKE_COMMIT_MESSAGE" > "$1"
        test -z "$FAKE_COMMIT_AMEND" || echo "$FAKE_COMMIT_AMEND" >> "$1"
@@ -47,6 +47,8 @@ for line in $FAKE_LINES; do
        case $line in
        squash|fixup|edit|reword)
                action="$line";;
+       exec*)
+               echo "$line" | sed 's/_/ /g' >> "$1";;
        "#")
                echo '# comment' >> "$1";;
        ">")