10 lines
324 B
Bash
Executable File
10 lines
324 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
template_file="./template_test.c"
|
|
|
|
template="$(grep -B9999 -- "END_TEMPLATE" "${template_file}")"
|
|
for file in $(find . -type f -name "*_test.c" -not -name "template_test.c"); do
|
|
tests="$(grep -A9999 -- "END_TEMPLATE" "${file}" | sed -e '1d')"
|
|
printf '%s\n%s' "${template}" "${tests}" > "${file}"
|
|
done
|