summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-02-02 23:34:03 +0100
committerJo-Philipp Wich <jo@mein.io>2022-02-03 11:58:31 +0100
commitafec8d7c5b9c8150db6ddf0c483bd64dee0444d6 (patch)
treebba0c8c8de61e5eef160f2393a682afada025dbf /tests
parent3ada6e0606e12dbb5d79eacf8e0eb87997477b51 (diff)
run_tests.sh: support placing supplemental testcase files
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/custom/run_tests.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/custom/run_tests.sh b/tests/custom/run_tests.sh
index a8c87bb..ffca822 100755
--- a/tests/custom/run_tests.sh
+++ b/tests/custom/run_tests.sh
@@ -40,6 +40,14 @@ extract_sections() {
outfile=$(printf "%s/%03d.%s" "$dir" $count "$tag")
printf "" > "$outfile"
;;
+ "-- File "*" --")
+ tag="file"
+ outfile="${line#-- File }"
+ outfile="$(echo "${outfile% --}" | xargs)"
+ outfile="$dir/files$(readlink -m "/${outfile:-file}")"
+ mkdir -p "$(dirname "$outfile")"
+ printf "" > "$outfile"
+ ;;
"-- End (no-eol) --")
truncate -s -1 "$outfile"
tag=""