Skip to content

Commit

Permalink
tests.json: add tests extracing URL encoded components
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Sep 12, 2024
1 parent 0679402 commit 4de8795
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,81 @@
"returncode": 0
}
},
{
"input": {
"arguments": [
"--url",
"https://curl.se/we/are.html",
"--get",
"{:scheme}"
]
},
"expected": {
"stdout": "https\n",
"stderr": "",
"returncode": 0
}
},
{
"input": {
"arguments": [
"--url",
"https://curl.se:55/we/are.html",
"--get",
"{url:port}"
]
},
"expected": {
"stdout": "55\n",
"stderr": "",
"returncode": 0
}
},
{
"input": {
"arguments": [
"--url",
"https://curl.se/%2e%61%13",
"--get",
"{:path}"
]
},
"expected": {
"stdout": "/.a%13\n",
"stderr": "",
"returncode": 0
}
},
{
"input": {
"arguments": [
"--url",
"https://curl.se?%2e%61%13",
"--get",
"{:query}"
]
},
"expected": {
"stdout": ".a%13\n",
"stderr": "",
"returncode": 0
}
},
{
"input": {
"arguments": [
"--url",
"https://curl.se/#%2e%61%13",
"--get",
"{:fragment}"
]
},
"expected": {
"stdout": "%2e%61%13\n",
"stderr": "",
"returncode": 0
}
},
{
"input": {
"arguments": [
Expand Down

0 comments on commit 4de8795

Please sign in to comment.