mirror of
https://github.com/sstephenson/bats.git
synced 2024-12-25 14:09:43 +01:00
bats_frame_filename
normalizes test filenames
This commit is contained in:
parent
ec6fbc10f1
commit
81be444b3b
|
@ -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")"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user