Add additional script for ad-hoc tests

This commit is contained in:
Fabrice Reix 2022-07-02 06:08:26 +02:00
parent b5ddf8a9dc
commit 1017dffdf1
No known key found for this signature in database
GPG Key ID: BF5213154B2E7155
2 changed files with 16 additions and 0 deletions

View File

@ -76,6 +76,7 @@ jobs:
./test_curl_commands.sh $(find ./tests_failed -maxdepth 1 -type f -name '*.curl' ! -name '*windows*')
./test_html_output.py tests_failed/*.html
xmllint --noout tests_failed/*.html
./ad_hoc.sh
./report.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v3

15
integration/ad_hoc.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# add more tests
# that can be easily added in tests_ok/ and tests_failed/
echo "Check file not found error"
actual=$(hurl does_not_exist.hurl 2>&1)
expected="error: hurl: cannot access 'does_not_exist.hurl': No such file or directory"
if [ "$actual" != "$expected" ]; then
echo "Error differs:"
echo "actual: $actual"
echo "expected: $expected"
exit 1
fi