mirror of
https://github.com/sstephenson/bats.git
synced 2026-02-25 17:28:11 +01:00
Fix for test files without trailing newlines (closes #12)
This commit is contained in:
@@ -172,7 +172,7 @@ BATS_OUT="${BATS_TMPNAME}.out"
|
||||
|
||||
bats_preprocess_source() {
|
||||
BATS_TEST_SOURCE="${BATS_TMPNAME}.src"
|
||||
tr -d '\r' < "$BATS_TEST_FILENAME" | bats-preprocess > "$BATS_TEST_SOURCE"
|
||||
{ tr -d '\r' < "$BATS_TEST_FILENAME"; echo; } | bats-preprocess > "$BATS_TEST_SOURCE"
|
||||
trap bats_cleanup_preprocessed_source err exit
|
||||
trap "bats_cleanup_preprocessed_source; exit 1" int
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user