mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-04 01:15:41 +02:00
t9391: guard dos2unix
use behind a prereq
Not all setups have `dos2unix`. Most notably, the Ubuntu and macOS agents of GitHub Actions don't. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
85afdf9da9
commit
d0dcece202
|
@ -164,6 +164,11 @@ test_expect_success 'other error cases' '
|
|||
)
|
||||
'
|
||||
|
||||
test_lazy_prereq DOS2UNIX '
|
||||
dos2unix -h
|
||||
test $? -ne 127
|
||||
'
|
||||
|
||||
test_expect_success 'lint-history' '
|
||||
test_create_repo lint-history &&
|
||||
(
|
||||
|
@ -181,10 +186,13 @@ test_expect_success 'lint-history' '
|
|||
git add content &&
|
||||
git commit -m "oops, that was embarassing" &&
|
||||
|
||||
$CONTRIB_DIR/lint-history --filenames-important dos2unix &&
|
||||
echo 2 >expect &&
|
||||
git rev-list --count HEAD >actual &&
|
||||
test_cmp expect actual
|
||||
if test_have_prereq DOS2UNIX
|
||||
then
|
||||
$CONTRIB_DIR/lint-history --filenames-important dos2unix &&
|
||||
echo 2 >expect &&
|
||||
git rev-list --count HEAD >actual &&
|
||||
test_cmp expect actual
|
||||
fi
|
||||
)
|
||||
'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user