test: Add small test for weird bash spacing
This commit is contained in:
6
test.sh
6
test.sh
@@ -29,7 +29,7 @@ label-block() {
|
|||||||
function run-testsuite() {
|
function run-testsuite() {
|
||||||
testname="$(basename "$1" .sh)"
|
testname="$(basename "$1" .sh)"
|
||||||
# if not running all tests or if this test is not explicitly selected, skip it
|
# if not running all tests or if this test is not explicitly selected, skip it
|
||||||
if test -z "$testsuite" || test "test-$testsuite" = "$testname";then
|
if test -z "$testsuite" || test "test-$testsuite" = "$testname"; then
|
||||||
fold_start "$testname"
|
fold_start "$testname"
|
||||||
"$@" || failures=$([ -n "$failures" ] && echo "$failures\\n$@" || echo "$@")
|
"$@" || failures=$([ -n "$failures" ] && echo "$failures\\n$@" || echo "$@")
|
||||||
fold_end "$testname"
|
fold_end "$testname"
|
||||||
@@ -40,12 +40,12 @@ function run-testsuite() {
|
|||||||
function skip-testsuite() {
|
function skip-testsuite() {
|
||||||
testname=$(basename "$1" .sh)
|
testname=$(basename "$1" .sh)
|
||||||
# show skip message only when running full suite
|
# show skip message only when running full suite
|
||||||
if test -z "$testsuite";then
|
if test -z "$testsuite"; then
|
||||||
echo skipping "$@" "($REASON)"
|
echo skipping "$@" "($REASON)"
|
||||||
echo 'SKIP'
|
echo 'SKIP'
|
||||||
else
|
else
|
||||||
# if a skipped suite is explicity called, run it anyway
|
# if a skipped suite is explicity called, run it anyway
|
||||||
if test "test-$testsuite" == "$testname";then
|
if test "test-$testsuite" == "$testname"; then
|
||||||
run-testsuite "$@"
|
run-testsuite "$@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ bad_files=$(
|
|||||||
if grep -q '^ ' "$i"; then
|
if grep -q '^ ' "$i"; then
|
||||||
echo "$i"
|
echo "$i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# search for files with weird semicolon, then pattern
|
||||||
|
if grep -q ';''then' "$i"; then
|
||||||
|
echo "$i"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user