tests: when run in Bash, annotate test failures with file name/line number
commit662f9cf1548cf069cb819e9e95f224657015fcf9
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 10 Apr 2020 17:18:12 +0000 (11 00:18 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Apr 2020 17:30:40 +0000 (10 10:30 -0700)
tree473a27581ab8d7a297496ddca05bd3be1f8d35af
parent6081d3898fe5e33e739cc0771f6df102b30b1db6
tests: when run in Bash, annotate test failures with file name/line number

When a test fails, it is nice to see where the corresponding code lives
in the worktree. Sadly, it seems that only Bash allows us to infer this
information. Let's do it when we detect that we're running in a Bash.

This will come in handy in the next commit, where we teach the GitHub
Actions workflow to annotate failed test runs with this information.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh