sstephenson / bats

Bash Automated Testing System
MIT License
7.12k stars 517 forks source link

strack trace is incorrect when setup() is present and test uses subshells #212

Open djerius opened 7 years ago

djerius commented 7 years ago

Here's the test code

setup () {
  true
}

@test "test" {
( false; )
}

And here's the somewhat confusing output:

% bats bug.bats
 ✗ test
   (from function `setup' in test file bug.bats, line 2)
     `true' failed

1 test, 1 failure