mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-11 02:40:26 +03:00
Add more integ tests for hurlfmt --in curl
This commit is contained in:
parent
b90dbf4925
commit
4550e75ae2
@ -1,3 +1,7 @@
|
||||
curl http://localhost:8000/hello
|
||||
curl http://localhost:8000/custom-headers -H 'Fruit:Raspberry' -H 'Fruit:Apple' -H 'Fruit:Banana' -H 'Fruit: Grape' -H 'Color:Green'
|
||||
curl --header 'Content-Type: application/json' --data $'{\n "name": "Bob",\n "password": "&secret\\\\\'<>",\n "age": 30,\n "strict": true,\n "spacing": "\\n",\n "g_clef": "\\uD834\\uDD1E",\n "items": [true, "true", 1],\n "variable": "\\\\"\n}' 'http://localhost:8000/post-json'
|
||||
curl --header 'Content-Type:' --data '@tests_ok/data.bin' 'http://localhost:8000/post-file'
|
||||
curl --location 'http://localhost:8000/redirect-absolute'
|
||||
curl -k https://localhost:8001/hello
|
||||
|
||||
|
@ -22,3 +22,15 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
POST http://localhost:8000/post-file
|
||||
Content-Type:
|
||||
file, tests_ok/data.bin;
|
||||
|
||||
GET http://localhost:8000/redirect-absolute
|
||||
[Options]
|
||||
location: true
|
||||
|
||||
GET https://localhost:8001/hello
|
||||
[Options]
|
||||
insecure: true
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl tests_ok/import_curl.out > $null # Validate expected file
|
||||
hurl --file-root . tests_ok/import_curl.out > $null # Validate expected file
|
||||
hurlfmt --in curl tests_ok/import_curl.in
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl tests_ok/import_curl.out >/dev/null # Validate expected file
|
||||
hurl --file-root . tests_ok/import_curl.out >/dev/null # Validate expected file
|
||||
hurlfmt --in curl tests_ok/import_curl.in
|
||||
|
Loading…
Reference in New Issue
Block a user