chore: improve tests/lean/copy-produced (#3006)
* do not take an argument, no longer needed * make it whitespace-in-filenames safe * copy verbosely when there are changes, for better user feedback
This commit is contained in:
parent
bd89787a87
commit
8be3897a8b
1 changed files with 8 additions and 4 deletions
|
|
@ -1,7 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
root="$(realpath $(dirname $0))"
|
||||
cd ${1:-$PWD}
|
||||
for f in $(find . -name '*.expected.out'); do
|
||||
cp ${f/.expected/.produced} "$root/$f"
|
||||
#
|
||||
# Updates all *.expected.out files it finds within tests/lean
|
||||
#
|
||||
|
||||
find "$(dirname "$0")" -name '*.expected.out' |
|
||||
while read -r to; do
|
||||
from="${to/.expected.out/.produced.out}"
|
||||
cmp -s "$from" "$to" || cp -v "$from" "$to"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue