mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 18:32:14 +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_expect_success 'lint-history' '
|
||||||
test_create_repo lint-history &&
|
test_create_repo lint-history &&
|
||||||
(
|
(
|
||||||
@ -181,10 +186,13 @@ test_expect_success 'lint-history' '
|
|||||||
git add content &&
|
git add content &&
|
||||||
git commit -m "oops, that was embarassing" &&
|
git commit -m "oops, that was embarassing" &&
|
||||||
|
|
||||||
$CONTRIB_DIR/lint-history --filenames-important dos2unix &&
|
if test_have_prereq DOS2UNIX
|
||||||
echo 2 >expect &&
|
then
|
||||||
git rev-list --count HEAD >actual &&
|
$CONTRIB_DIR/lint-history --filenames-important dos2unix &&
|
||||||
test_cmp expect actual
|
echo 2 >expect &&
|
||||||
|
git rev-list --count HEAD >actual &&
|
||||||
|
test_cmp expect actual
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user