bats-core / bats-assert

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

Allows negative indexes in line assertions #30

Closed nkakouros closed 2 years ago

nkakouros commented 3 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.