From 69f7224d95b8c8ae03fc0b34b890eae015772a45 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Fri, 15 Mar 2019 08:06:49 -0700 Subject: [PATCH] filter-repo: add tests for invalid fast-import directives Signed-off-by: Elijah Newren --- t/t9390-filter-repo.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/t/t9390-filter-repo.sh b/t/t9390-filter-repo.sh index bb538b1..8e57259 100755 --- a/t/t9390-filter-repo.sh +++ b/t/t9390-filter-repo.sh @@ -751,6 +751,21 @@ test_expect_success 'other startup error cases and requests for help' ' ) ' +test_expect_success 'invalid fast-import directives' ' + ( + git init invalid_directives && + cd invalid_directives && + + echo "get-mark :15" | \ + test_must_fail git filter-repo --stdin --force 2>err && + test_i18ngrep "Unsupported command" err && + + echo "invalid-directive" | \ + test_must_fail git filter-repo --stdin --force 2>err && + test_i18ngrep "Could not parse line" err + ) +' + test_expect_success 'mailmap sanity checks' ' ( git clone file://"$(pwd)"/analyze_me mailmap_sanity_checks &&