mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-11-07 09:20:29 +00:00
filter-repo: add tests checking error paths in mailmap parsing
Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
8a1358cc30
commit
dd4f3bd111
@ -717,4 +717,26 @@ test_expect_success 'startup sanity checks' '
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'mailmap sanity checks' '
|
||||
(
|
||||
git clone file://"$(pwd)"/analyze_me mailmap_sanity_checks &&
|
||||
cd mailmap_sanity_checks &&
|
||||
|
||||
test_must_fail git filter-repo --mailmap /fake/path 2>../err &&
|
||||
test_i18ngrep "Cannot read /fake/path" ../err &&
|
||||
|
||||
echo "Total Bogus" >../whoopsies &&
|
||||
test_must_fail git filter-repo --mailmap ../whoopsies 2>../err &&
|
||||
test_i18ngrep "Unparseable mailmap file" ../err &&
|
||||
rm ../err &&
|
||||
rm ../whoopsies &&
|
||||
|
||||
echo "Me <me@site.com> Myself <yo@email.com> Extraneous" >../whoopsies &&
|
||||
test_must_fail git filter-repo --mailmap ../whoopsies 2>../err &&
|
||||
test_i18ngrep "Unparseable mailmap file" ../err &&
|
||||
rm ../err &&
|
||||
rm ../whoopsies
|
||||
)
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Loading…
Reference in New Issue
Block a user