mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-27 16:26:40 +03:00
20 lines
373 B
Bash
Executable File
20 lines
373 B
Bash
Executable File
#!/bin/bash
|
|
set -eo pipefail
|
|
|
|
for hurl_file in "$@"; do
|
|
html_file="${hurl_file%.*}".html
|
|
cmd="hurlfmt --format html $hurl_file"
|
|
echo "$cmd"
|
|
$cmd >/tmp/test.stdout
|
|
|
|
expected=$(cat "$html_file")
|
|
actual=$(cat /tmp/test.stdout)
|
|
if [ "$actual" != "$expected" ]; then
|
|
diff <(echo "$actual" ) <(echo "$expected")
|
|
exit 1
|
|
fi
|
|
|
|
done
|
|
|
|
|