t7810: use test_expect_code() instead of hand-rolled comparison
[gitweb.git] / t / t7501-commit.sh
index 9dbbd01fc07724e378a864e3fe735269665a9bc3..282ff423318902f908c926af7b6ccab041388262 100755 (executable)
@@ -47,7 +47,7 @@ test_expect_success 'paths and -a do not mix' '
 test_expect_success PERL 'can use paths with --interactive' '
        echo bong-o-bong >file &&
        # 2: update, 1:st path, that is all, 7: quit
-       ( echo 2; echo 1; echo; echo 7 ) |
+       test_write_lines 2 1 "" 7 |
        git commit -m foo --interactive file &&
        git reset --hard HEAD^
 '
@@ -293,7 +293,7 @@ test_expect_success PERL 'interactive add' '
 test_expect_success PERL "commit --interactive doesn't change index if editor aborts" '
        echo zoo >file &&
        test_must_fail git diff --exit-code >diff1 &&
-       (echo u ; echo "*" ; echo q) |
+       test_write_lines u "*" q |
        (
                EDITOR=: &&
                export EDITOR &&