Orange-OpenSource / Orange-OpenSource/hurl
Invalid Source Line in diff error message when using variable with newline
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.2k
- Forks
- 745
- Avg merge
- 5h 3m
- Merged PRs (30d)
- 60
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
|
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the invalid source-line output with the multiline Hurl example and a newline-valued variable, then trace the diff error formatting path. Done means the reported source line points to the actual mismatching body line rather than the closing code fence, with regression coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100