Replace tab in Hurl entry line

This commit is contained in:
Fabrice Reix 2024-04-18 13:44:24 +02:00 committed by hurl-bot
parent 07c3ee8b37
commit 58840f25d7
No known key found for this signature in database
GPG Key ID: 1283A2B4A0DCAF8D
7 changed files with 22 additions and 0 deletions

View File

@ -24,6 +24,7 @@ def main():
get_files("tests_ok/*." + extension)
+ get_files("tests_ok_not_linted/*." + extension)
+ get_files("tests_failed/*." + extension)
+ get_files("tests_failed_not_linted/*." + extension)
+ get_files("tests_error_parser/*." + extension)
+ get_files("ssl/*." + extension)
)

View File

@ -0,0 +1,9 @@
error: Assert body value
--> tests_failed_not_linted/tab.hurl:4:2
|
| GET http://localhost:8000/hello
| ...
4 | `Hello World`
| ^^^^^^^^^^^^^ actual value is <Hello World!>
|

View File

@ -0,0 +1 @@
4

View File

@ -0,0 +1,4 @@
# Include tabs
GET http://localhost:8000/hello
HTTP 200
`Hello World`

View File

@ -0,0 +1,3 @@
Set-StrictMode -Version latest
$ErrorActionPreference = 'Stop'
hurl tests_failed_not_linted/tab.hurl

View File

@ -0,0 +1,3 @@
#!/bin/bash
set -Eeuo pipefail
hurl tests_failed_not_linted/tab.hurl

View File

@ -491,6 +491,7 @@ pub(crate) fn error_string<E: Error>(
if let Some(entry_line) = entry_line {
if entry_line != error_line {
let line = lines.get(entry_line - 1).unwrap();
let line = line.replace('\t', " ");
let line = if colored {
line.bright_black().to_string()
} else {