mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-09-11 05:35:53 +03:00
Update doc diff
This commit is contained in:
parent
b74ddf49fa
commit
d75d2424a8
@ -98,15 +98,14 @@ A diff output (similar to git diff) could be used instead to display the error.
|
|||||||
|
|
||||||
```
|
```
|
||||||
error: Assert body value
|
error: Assert body value
|
||||||
--> test.hurl:4:1
|
--> test.hurl:8:1
|
||||||
|
|
|
|
||||||
| GET http://localhost:8000/test
|
| GET http://localhost:8000/test
|
||||||
| ...
|
| ...
|
||||||
4 | @@ -2,7 +2,7 @@
|
|
||||||
| "first_name": "John",
|
| "first_name": "John",
|
||||||
| "last_name": "Smith",
|
| "last_name": "Smith",
|
||||||
| "is_alive": true,
|
| "is_alive": true,
|
||||||
| - "age": 27,
|
8 | - "age": 27,
|
||||||
| + "age": 28,
|
| + "age": 28,
|
||||||
| "address": {
|
| "address": {
|
||||||
| "street_address": "21 2nd Street",
|
| "street_address": "21 2nd Street",
|
||||||
@ -130,8 +129,7 @@ error: Assert body value
|
|||||||
|
|
|
|
||||||
| GET http://localhost:8000/test
|
| GET http://localhost:8000/test
|
||||||
| ...
|
| ...
|
||||||
4 | @@ -1 +1 @@
|
4 | -Hello World!
|
||||||
| -Hello World!
|
|
||||||
| +Hi World!
|
| +Hi World!
|
||||||
|
|
|
|
||||||
```
|
```
|
||||||
@ -145,6 +143,146 @@ The color is necessary here to see the additional whitespace.
|
|||||||
We could also add a cli option to show explicitly "invisible characters".
|
We could also add a cli option to show explicitly "invisible characters".
|
||||||
|
|
||||||
|
|
||||||
|
### Display more or less context lines before first change
|
||||||
|
|
||||||
|
## Change at line 1
|
||||||
|
|
||||||
|
Standard unified diff
|
||||||
|
|
||||||
|
```
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-{
|
||||||
|
+[
|
||||||
|
"first_name": "John",
|
||||||
|
"last_name": "Smith",
|
||||||
|
"is_alive": true,
|
||||||
|
```
|
||||||
|
|
||||||
|
Hurl Output
|
||||||
|
|
||||||
|
```
|
||||||
|
error: Assert body value
|
||||||
|
--> test.hurl:4:1
|
||||||
|
|
|
||||||
|
| GET http://localhost:8000/test
|
||||||
|
4 | -{
|
||||||
|
| +[
|
||||||
|
| "first_name": "John",
|
||||||
|
| "last_name": "Smith",
|
||||||
|
| "is_alive": true,
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Change at line 2
|
||||||
|
|
||||||
|
|
||||||
|
Standard unified diff
|
||||||
|
|
||||||
|
```
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
{
|
||||||
|
- "first_name": "John",
|
||||||
|
+ "first_name": "Bob",
|
||||||
|
"last_name": "Smith",
|
||||||
|
"is_alive": true,
|
||||||
|
"age": 27,
|
||||||
|
```
|
||||||
|
|
||||||
|
Hurl Output
|
||||||
|
|
||||||
|
```
|
||||||
|
error: Assert body value
|
||||||
|
--> test.hurl:5:1
|
||||||
|
|
|
||||||
|
| GET http://localhost:8000/test
|
||||||
|
| {
|
||||||
|
5 |- "first_name": "John",
|
||||||
|
|+ "first_name": "Bob",
|
||||||
|
| "is_alive": true,
|
||||||
|
| "age": 27,
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Change at line 3
|
||||||
|
|
||||||
|
Standard unified diff
|
||||||
|
|
||||||
|
```
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
{
|
||||||
|
"first_name": "John",
|
||||||
|
- "last_name": "Smith",
|
||||||
|
+ "last_name": "Smiths",
|
||||||
|
"is_alive": true,
|
||||||
|
"age": 27,
|
||||||
|
"address": {
|
||||||
|
```
|
||||||
|
|
||||||
|
Hurl Output
|
||||||
|
|
||||||
|
```
|
||||||
|
error: Assert body value
|
||||||
|
--> test.hurl:6:1
|
||||||
|
|
|
||||||
|
| GET http://localhost:8000/test
|
||||||
|
| {
|
||||||
|
| "first_name": "John",
|
||||||
|
6 |- "last_name": "Smith",
|
||||||
|
|+ "last_name": "Smiths",
|
||||||
|
| "is_alive": true,
|
||||||
|
| "age": 27,
|
||||||
|
| "address": {
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Display several diff Hunks
|
||||||
|
|
||||||
|
|
||||||
|
Standard Unified Diff
|
||||||
|
|
||||||
|
```
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
"first_name": "John",
|
||||||
|
"last_name": "Smith",
|
||||||
|
"is_alive": true,
|
||||||
|
- "age": 27,
|
||||||
|
+ "age": 28,
|
||||||
|
"address": {
|
||||||
|
"street_address": "21 2nd Street",
|
||||||
|
"city": "New York",
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
"children": [
|
||||||
|
"Catherine",
|
||||||
|
"Thomas",
|
||||||
|
- "Trevor"
|
||||||
|
+ "Bob"
|
||||||
|
],
|
||||||
|
"spouse": null
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
error: Assert body value
|
||||||
|
--> test.hurl:8:1
|
||||||
|
|
|
||||||
|
| GET http://localhost:8000/test
|
||||||
|
| ...
|
||||||
|
| "first_name": "John",
|
||||||
|
|- "last_name": "Smith",
|
||||||
|
| "is_alive": true,
|
||||||
|
8 |- "age": 27,
|
||||||
|
|+ "age": 28,
|
||||||
|
| "address": {
|
||||||
|
| "street_address": "21 2nd Street",
|
||||||
|
| "city": "New York",
|
||||||
|
| ...
|
||||||
|
| "children": [
|
||||||
|
| "Catherine",
|
||||||
|
| "Thomas",
|
||||||
|
28 |- "Trevor"
|
||||||
|
|+ "Bob"
|
||||||
|
| ],
|
||||||
|
| "spouse": null
|
||||||
|
| }
|
||||||
|
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user