bats-core / bats-assert

Common assertions for Bats
Creative Commons Zero v1.0 Universal
98 stars 42 forks source link

Allows negative indexes in line assertions #30

Closed nkakouros closed 2 years ago

nkakouros commented 4 years ago

It is easier to match the last line of the output with:

assert_line -n -1 'text'

than:

assert_line -n 13 'text'

The preceding text may also change and a standard count from the top may not be possible.

martin-schulze-vireso commented 2 years ago

Thanks for your PR.