Add test with a tab in expected body

This commit is contained in:
Fabrice Reix 2024-06-29 08:37:48 +02:00 committed by hurl-bot
parent db8511add2
commit 0768ec8371
No known key found for this signature in database
GPG Key ID: 1283A2B4A0DCAF8D
6 changed files with 45 additions and 5 deletions

View File

@ -24,3 +24,20 @@ Succeeded files: 1 (100.0%)
Failed files: 0 (0.0%)
Duration: <<<\d+>>> ms
error: Assert body value
--> tests_ok/test.4.hurl:3:1
|
| GET http://localhost:8000/hello
| ...
3 | `Hello\tWorld!`
| ^^^^^^^^^^^^^^^ actual value is <Hello World!>
|
tests_ok/test.4.hurl: Failure (1 request(s) in <<<\d+>>> ms)
--------------------------------------------------------------------------------
Executed files: 1
Executed requests: 1 (<<<.*?>>>/s)
Succeeded files: 0 (0.0%)
Failed files: 1 (100.0%)
Duration: <<<\d+>>> ms

View File

@ -5,4 +5,11 @@
| ...
8 | `Goodbye World!`
| ^^^^^^^^^^^^^^^^ actual value is &lt;Hello World!&gt;
|</failure></testcase></testsuite><testsuite tests="1" errors="0" failures="0"><testcase id="tests_ok/test.3.hurl" name="tests_ok/test.3.hurl" time="<<<.*?>>>" /></testsuite></testsuites>
|</failure></testcase></testsuite><testsuite tests="1" errors="0" failures="0"><testcase id="tests_ok/test.3.hurl" name="tests_ok/test.3.hurl" time="<<<.*?>>>" /></testsuite><testsuite tests="1" errors="0" failures="1"><testcase id="tests_ok/test.4.hurl" name="tests_ok/test.4.hurl" time="<<<.*?>>>"><failure>Assert body value
--&gt; tests_ok/test.4.hurl:3:1
|
| GET http://localhost:8000/hello
| ...
3 | `Hello\tWorld!`
| ^^^^^^^^^^^^^^^ actual value is &lt;Hello World!&gt;
|</failure></testcase></testsuite></testsuites>

View File

@ -9,6 +9,8 @@ $ErrorActionPreference = 'Continue'
# We use --jobs 1 to force the standard error order to be test1 then test2.
hurl --test --jobs 1 --report-junit build/junit/result.xml tests_ok/test.1.hurl tests_ok/test.2.hurl
hurl --test --report-junit build/junit/result.xml tests_ok/test.3.hurl
# TBC: using || true versus $ErrorActionPreference = 'Continue'
hurl --test --report-junit build/junit/result.xml tests_ok/test.4.hurl || true
$ErrorActionPreference = 'Stop'
Write-Host (Get-Content build/junit/result.xml -Raw) -NoNewLine

View File

@ -7,6 +7,7 @@ set +eo pipefail
# We use --jobs 1 to force the standard error order to be test1 then test2.
hurl --test --jobs 1 --report-junit build/junit/result.xml tests_ok/test.1.hurl tests_ok/test.2.hurl
hurl --test --report-junit build/junit/result.xml tests_ok/test.3.hurl
hurl --test --report-junit build/junit/result.xml tests_ok/test.4.hurl
set -Eeuo pipefail
cat build/junit/result.xml

View File

@ -0,0 +1,3 @@
GET http://localhost:8000/hello
HTTP 200
`Hello\tWorld!`

View File

@ -10,10 +10,20 @@ error: Assert body value
tests_ok<<<.*?>>>test.2.hurl: Failure (2 request(s) in <<<\d+>>> ms)
tests_ok<<<.*?>>>test.3.hurl: Success (1 request(s) in <<<\d+>>> ms)
error: Assert body value
--> tests_ok<<<.*?>>>test.4.hurl:3:1
|
| GET http://localhost:8000/hello
| ...
3 | `Hello\tWorld!`
| ^^^^^^^^^^^^^^^ actual value is <Hello World!>
|
tests_ok<<<.*?>>>test.4.hurl: Failure (1 request(s) in <<<\d+>>> ms)
--------------------------------------------------------------------------------
Executed files: 3
Executed requests: 4 (<<<.*?>>>/s)
Succeeded files: 2 (66.7%)
Failed files: 1 (33.3%)
Executed files: 4
Executed requests: 5 (<<<.*?>>>/s)
Succeeded files: 2 (50.0%)
Failed files: 2 (50.0%)
Duration: <<<\d+>>> ms