hurl/integration/hurl_echo

17 lines
368 B
Plaintext
Raw Normal View History

2020-08-27 10:07:46 +03:00
#!/bin/bash
set -e
for input_file in "$@"; do
echo "$input_file"
output_file="/tmp/$(basename "$input_file")"
hurlfmt --no-format "$input_file" >"$output_file"
expected=$(cat "$input_file")
actual=$(cat "$output_file")
if [ "$actual" != "$expected" ]; then
echo "=> Difference!"
diff "$output_file" "$input_file"
exit &
fi
done