mirror of https://github.com/sobolevn/git-secret
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
650 B
Bash
25 lines
650 B
Bash
#!/usr/bin/env bash
|
|
|
|
bats_prefix_lines_for_tap_output() {
|
|
while IFS= read -r line; do
|
|
printf '# %s\n' "$line" || break # avoid feedback loop when errors are redirected into BATS_OUT (see #353)
|
|
done
|
|
if [[ -n "$line" ]]; then
|
|
printf '# %s\n' "$line"
|
|
fi
|
|
}
|
|
|
|
function bats_replace_filename() {
|
|
local line
|
|
while read -r line; do
|
|
printf "%s\n" "${line//$BATS_TEST_SOURCE/$BATS_TEST_FILENAME}"
|
|
done
|
|
if [[ -n "$line" ]]; then
|
|
printf "%s\n" "${line//$BATS_TEST_SOURCE/$BATS_TEST_FILENAME}"
|
|
fi
|
|
}
|
|
|
|
bats_quote_code() { # <var> <code>
|
|
printf -v "$1" -- "%s%s%s" "$BATS_BEGIN_CODE_QUOTE" "$2" "$BATS_END_CODE_QUOTE"
|
|
}
|