forked from bats-core/bats-support
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Print Functions Consistent with
--keep-empty-lines
* Updating `batslib_count_lines` to automatically detect trailing newlines and count them if present. * This works on the concept that a string has a trailing newline if it was intended -- e.g. via `run --keep-empty-lines` or similar. * Updating `batslib_prefix` and `batslib_mark` to accept `--keep-empty-lines` option to properly print empty lines and trailing newlines. * Updating `batslib_print_kv_single_or_multi` calls to `batslib_prefix`. * Will automatically detect trailing new lines (on a per-value basis). * If trailing newline is present, `--keep-empty-lines` will be passed to `batslib_prefix`. This implements option 4 for `batslib_count_lines` and `batslib_print_kv_single_or_multi`, and option 2 for `batslib_prefix` and `batslib_mark`, as discussed in bats-core#11. Fixes bats-core#11.
- Loading branch information
1 parent
9bf10e8
commit dc50d97
Showing
1 changed file
with
60 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters