1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-12-26 06:29:47 +01:00

bats_frame_filename normalizes test filenames

This commit is contained in:
Sam Stephenson 2014-08-12 15:14:16 -05:00
parent ec6fbc10f1
commit 81be444b3b

View File

@ -122,13 +122,7 @@ bats_print_stack_trace() {
local count="${#@}"
for frame in "$@"; do
local filename
if [ $index -eq $count ]; then
filename="$BATS_TEST_FILENAME"
else
filename="$(bats_frame_filename "$frame")"
fi
local filename="$(bats_frame_filename "$frame")"
local lineno="$(bats_frame_lineno "$frame")"
if [ $index -eq 1 ]; then
@ -154,16 +148,9 @@ bats_print_stack_trace() {
bats_print_failed_command() {
local frame="$1"
local count="${#@}"
local filename
if [ $count -eq 1 ]; then
filename="$BATS_TEST_FILENAME"
else
filename="$(bats_frame_filename "$frame")"
fi
local filename="$(bats_frame_filename "$frame")"
local lineno="$(bats_frame_lineno "$frame")"
local failed_line="$(bats_extract_line "$filename" "$lineno")"
local failed_command="$(bats_strip_string "$failed_line")"