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() {
|
||||
testname="$(basename "$1" .sh)"
|
||||
# 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"
|
||||
"$@" || failures=$([ -n "$failures" ] && echo "$failures\\n$@" || echo "$@")
|
||||
fold_end "$testname"
|
||||
@@ -40,12 +40,12 @@ function run-testsuite() {
|
||||
function skip-testsuite() {
|
||||
testname=$(basename "$1" .sh)
|
||||
# show skip message only when running full suite
|
||||
if test -z "$testsuite";then
|
||||
if test -z "$testsuite"; then
|
||||
echo skipping "$@" "($REASON)"
|
||||
echo 'SKIP'
|
||||
else
|
||||
# if a skipped suite is explicity called, run it anyway
|
||||
if test "test-$testsuite" == "$testname";then
|
||||
if test "test-$testsuite" == "$testname"; then
|
||||
run-testsuite "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -26,6 +26,11 @@ bad_files=$(
|
||||
if grep -q '^ ' "$i"; then
|
||||
echo "$i"
|
||||
fi
|
||||
|
||||
# search for files with weird semicolon, then pattern
|
||||
if grep -q ';''then' "$i"; then
|
||||
echo "$i"
|
||||
fi
|
||||
done
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user