mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-23 00:44:55 +03:00
Replace tab in Hurl entry line
This commit is contained in:
parent
07c3ee8b37
commit
58840f25d7
@ -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)
|
||||
)
|
||||
|
9
integration/hurl/tests_failed_not_linted/tab.err
Normal file
9
integration/hurl/tests_failed_not_linted/tab.err
Normal 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!>
|
||||
|
|
||||
|
1
integration/hurl/tests_failed_not_linted/tab.exit
Normal file
1
integration/hurl/tests_failed_not_linted/tab.exit
Normal file
@ -0,0 +1 @@
|
||||
4
|
4
integration/hurl/tests_failed_not_linted/tab.hurl
Normal file
4
integration/hurl/tests_failed_not_linted/tab.hurl
Normal file
@ -0,0 +1,4 @@
|
||||
# Include tabs
|
||||
GET http://localhost:8000/hello
|
||||
HTTP 200
|
||||
`Hello World`
|
3
integration/hurl/tests_failed_not_linted/tab.ps1
Normal file
3
integration/hurl/tests_failed_not_linted/tab.ps1
Normal file
@ -0,0 +1,3 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl tests_failed_not_linted/tab.hurl
|
3
integration/hurl/tests_failed_not_linted/tab.sh
Executable file
3
integration/hurl/tests_failed_not_linted/tab.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl tests_failed_not_linted/tab.hurl
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user