Merge branch 'ps/chainlint-self-check-update'
Test framework update. * ps/chainlint-self-check-update: tests: adjust whitespace in chainlint expectations
This commit is contained in:
14
t/Makefile
14
t/Makefile
@ -103,20 +103,12 @@ check-chainlint:
|
|||||||
echo "# chainlint: $(CHAINLINTTMP_SQ)/tests" && \
|
echo "# chainlint: $(CHAINLINTTMP_SQ)/tests" && \
|
||||||
for i in $(CHAINLINTTESTS); do \
|
for i in $(CHAINLINTTESTS); do \
|
||||||
echo "# chainlint: $$i" && \
|
echo "# chainlint: $$i" && \
|
||||||
sed -e '/^[ ]*$$/d' chainlint/$$i.expect; \
|
cat chainlint/$$i.expect; \
|
||||||
done \
|
done \
|
||||||
} >'$(CHAINLINTTMP_SQ)'/expect && \
|
} >'$(CHAINLINTTMP_SQ)'/expect && \
|
||||||
$(CHAINLINT) --emit-all '$(CHAINLINTTMP_SQ)'/tests | \
|
$(CHAINLINT) --emit-all '$(CHAINLINTTMP_SQ)'/tests | \
|
||||||
sed -e 's/^[1-9][0-9]* //;/^[ ]*$$/d' >'$(CHAINLINTTMP_SQ)'/actual && \
|
sed -e 's/^[1-9][0-9]* //' >'$(CHAINLINTTMP_SQ)'/actual && \
|
||||||
if test -f ../GIT-BUILD-OPTIONS; then \
|
diff -u '$(CHAINLINTTMP_SQ)'/expect '$(CHAINLINTTMP_SQ)'/actual
|
||||||
. ../GIT-BUILD-OPTIONS; \
|
|
||||||
fi && \
|
|
||||||
if test -x ../git$$X; then \
|
|
||||||
DIFFW="../git$$X --no-pager diff -w --no-index"; \
|
|
||||||
else \
|
|
||||||
DIFFW="diff -w -u"; \
|
|
||||||
fi && \
|
|
||||||
$$DIFFW '$(CHAINLINTTMP_SQ)'/expect '$(CHAINLINTTMP_SQ)'/actual
|
|
||||||
|
|
||||||
test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \
|
test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \
|
||||||
test-lint-filenames
|
test-lint-filenames
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
(
|
(
|
||||||
|
|
||||||
nothing &&
|
nothing &&
|
||||||
|
|
||||||
something
|
something
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
echo 'fatal: reword option of --fixup is mutually exclusive with' '--patch/--interactive/--all/--include/--only' >expect &&
|
echo 'fatal: reword option of --fixup is mutually exclusive with' '--patch/--interactive/--all/--include/--only' >expect &&
|
||||||
test_must_fail git commit --fixup=reword:HEAD~ $1 2>actual &&
|
test_must_fail git commit --fixup=reword:HEAD~ $1 2>actual &&
|
||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
|
|
||||||
|
@ -9,3 +9,4 @@ grep "^\.git$" output.txt &&
|
|||||||
) >output &&
|
) >output &&
|
||||||
cut -d ' ' -f 2 <output | sort >actual &&
|
cut -d ' ' -f 2 <output | sort >actual &&
|
||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
bar
|
bar
|
||||||
EOF
|
EOF
|
||||||
done ?!AMP?!
|
done ?!AMP?!
|
||||||
|
|
||||||
for i in a b c; do
|
for i in a b c; do
|
||||||
echo $i &&
|
echo $i &&
|
||||||
cat $i ?!LOOP?!
|
cat $i ?!LOOP?!
|
||||||
|
@ -2,18 +2,24 @@
|
|||||||
(cd foo &&
|
(cd foo &&
|
||||||
bar
|
bar
|
||||||
) &&
|
) &&
|
||||||
|
|
||||||
(cd foo &&
|
(cd foo &&
|
||||||
bar
|
bar
|
||||||
) ?!AMP?!
|
) ?!AMP?!
|
||||||
|
|
||||||
(
|
(
|
||||||
cd foo &&
|
cd foo &&
|
||||||
bar) &&
|
bar) &&
|
||||||
|
|
||||||
(
|
(
|
||||||
cd foo &&
|
cd foo &&
|
||||||
bar) ?!AMP?!
|
bar) ?!AMP?!
|
||||||
|
|
||||||
(cd foo &&
|
(cd foo &&
|
||||||
bar) &&
|
bar) &&
|
||||||
|
|
||||||
(cd foo &&
|
(cd foo &&
|
||||||
bar) ?!AMP?!
|
bar) ?!AMP?!
|
||||||
|
|
||||||
foobar
|
foobar
|
||||||
)
|
)
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
echo a &&
|
echo a &&
|
||||||
echo b
|
echo b
|
||||||
) >file &&
|
) >file &&
|
||||||
|
|
||||||
cd foo &&
|
cd foo &&
|
||||||
(
|
(
|
||||||
echo a ?!AMP?!
|
echo a ?!AMP?!
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
foo |
|
foo |
|
||||||
bar |
|
bar |
|
||||||
baz &&
|
baz &&
|
||||||
|
|
||||||
fish |
|
fish |
|
||||||
cow ?!AMP?!
|
cow ?!AMP?!
|
||||||
|
|
||||||
sunder
|
sunder
|
||||||
)
|
)
|
||||||
|
@ -2,13 +2,18 @@
|
|||||||
(foo && bar) &&
|
(foo && bar) &&
|
||||||
(foo && bar) |
|
(foo && bar) |
|
||||||
(foo && bar) >baz &&
|
(foo && bar) >baz &&
|
||||||
|
|
||||||
(foo; ?!AMP?! bar) &&
|
(foo; ?!AMP?! bar) &&
|
||||||
(foo; ?!AMP?! bar) |
|
(foo; ?!AMP?! bar) |
|
||||||
(foo; ?!AMP?! bar) >baz &&
|
(foo; ?!AMP?! bar) >baz &&
|
||||||
|
|
||||||
(foo || exit 1) &&
|
(foo || exit 1) &&
|
||||||
(foo || exit 1) |
|
(foo || exit 1) |
|
||||||
(foo || exit 1) >baz &&
|
(foo || exit 1) >baz &&
|
||||||
|
|
||||||
(foo && bar) ?!AMP?!
|
(foo && bar) ?!AMP?!
|
||||||
|
|
||||||
(foo && bar; ?!AMP?! baz) ?!AMP?!
|
(foo && bar; ?!AMP?! baz) ?!AMP?!
|
||||||
|
|
||||||
foobar
|
foobar
|
||||||
)
|
)
|
||||||
|
@ -15,6 +15,7 @@ main-sub4" &&
|
|||||||
$chkms
|
$chkms
|
||||||
TXT
|
TXT
|
||||||
) &&
|
) &&
|
||||||
|
|
||||||
subfiles=$(git ls-files) &&
|
subfiles=$(git ls-files) &&
|
||||||
check_equal "$subfiles" "$chkms
|
check_equal "$subfiles" "$chkms
|
||||||
$chks"
|
$chks"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
bar
|
bar
|
||||||
EOF
|
EOF
|
||||||
done ?!AMP?!
|
done ?!AMP?!
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo foo &&
|
echo foo &&
|
||||||
cat bar ?!LOOP?!
|
cat bar ?!LOOP?!
|
||||||
|
Reference in New Issue
Block a user