Open
Description
The following textual response
line1
line2
line3
line4
can be tested with the multiline body in Hurl.:
1 GET http://localhost:8000/test
2 HTTP 200
3 ```
4 line1
5 line2
6 line3
7 line4
8 ```
If LINE4
is returned by the server (instead of line4
), we have the following error message (as expected):
--> test.hurl:5:1
|
| GET http://localhost:8000/test
| ...
7 | line4
| -line4
| +LINE4
|
The invalid source line can occur when the expected body contains variables with newline value.
For example:
1 GET http://localhost:8000/test
2 [Options]
3 variable: newline=\n
4 HTTP 200
5 ```
6 line1
7 line2{{newline}}line3
8 line4
9 ```
The error has now an invalid source line:
--> /tmp/test.hurl:9:1
|
| GET http://localhost:8000/test
| ...
9 | ```
| -line4
| +LINE4
|
```