forked from ztombol/bats-assert
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
I'd like to make two suggestions:
1. Add -t|--trim to assert_line
The goal here would be to trim input before comparing it, so that all whitespaces before and after are removed. That's sometimes useful when you don't know how many spaces will be in the content, because it's sometimes based on terminal width. And in some cases, when lines are smaller, or empty, comparison checks can be done on just an empty string and it'll work.
2. Add -q|--quotes to assert_line
This would prevent things like that:
-- line differs --
index : 1
expected :
actual :
--
And allow displaying errors like that for instance:
-- line differs --
index : 1
expected : ""
actual : " "
--
Easier debugging for string that are not trimmed beforehand.
I'm not sure yet how to contribute this, but I can help :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels