-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for backtick strings in predicates values.
We are now able to support this code: ``` GET http://foo.com HTTP 200 [Asserts] xpath "string(//title)" == `Bob says: "Hi"` ```
- Loading branch information
Showing
6 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"cookies":[{"domain":"localhost","expires":"<<<\d+>>>","https":"FALSE","include_subdomain":"FALSE","name":"cookie2","path":"/","value":"valueA"}],"entries":[{"asserts":[{"line":7,"success":true},{"line":7,"success":true},{"line":8,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":6,"time":<<<\d+>>>},{"asserts":[{"line":13,"success":true},{"line":13,"success":true},{"line":15,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/cookies/set-session-cookie2-valueA"},"response":{"cookies":[{"name":"cookie2","path":"/","value":"valueA"}],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Set-Cookie","value":"cookie2=valueA; Path=/"},{"name":"Server","value":"Flask Server"},{"name":"Content-Length","value":"0"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":2,"line":12,"time":<<<\d+>>>},{"asserts":[{"line":21,"success":true},{"line":21,"success":true},{"line":23,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"Accept","value":"text/plain"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/follow-redirect"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"267"},{"name":"Location","value":"http://localhost:8000/following-redirect"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":302},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":3,"line":19,"time":<<<\d+>>>},{"asserts":[{"line":31,"success":true},{"line":31,"success":true},{"line":34,"success":true},{"line":33,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"Accept","value":"text/plain"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/follow-redirect"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"267"},{"name":"Location","value":"http://localhost:8000/following-redirect"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":302},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}},{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"Accept","value":"text/plain"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/following-redirect"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"70"},{"name":"Location","value":"http://localhost:8000/followed-redirect"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":302},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}},{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"Accept","value":"text/plain"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/followed-redirect"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"18"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":4,"line":27,"time":<<<\d+>>>},{"asserts":[{"line":39,"success":true},{"line":39,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/captures"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Header1","value":"value1"},{"name":"Header2","value":"Hello Bob!"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[{"name":"param1","value":"value1"},{"name":"param2","value":"Bob"},{"name":"param3","value":"Bob"},{"name":"data1","value":"Hello world!"},{"name":"data2","value":"Hello world!"}],"index":5,"line":38,"time":<<<\d+>>>},{"asserts":[{"line":50,"success":true},{"line":50,"success":true},{"line":52,"success":true},{"line":53,"success":true},{"line":54,"success":true},{"line":55,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/assert-json"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"application/json"},{"name":"Content-Length","value":"322"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":6,"line":49,"time":<<<\d+>>>}],"filename":"tests_ok/json_output.hurl","success":true,"time":<<<\d+>>>} | ||
{"cookies":[{"domain":"localhost","expires":"<<<\d+>>>","https":"FALSE","include_subdomain":"FALSE","name":"cookie2","path":"/","value":"valueA"}],"entries":[{"asserts":[{"line":7,"success":true},{"line":7,"success":true},{"line":8,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/hello"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":1,"line":6,"time":<<<\d+>>>},{"asserts":[{"line":13,"success":true},{"line":13,"success":true},{"line":15,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/cookies/set-session-cookie2-valueA"},"response":{"cookies":[{"name":"cookie2","path":"/","value":"valueA"}],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Set-Cookie","value":"cookie2=valueA; Path=/"},{"name":"Server","value":"Flask Server"},{"name":"Content-Length","value":"0"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":2,"line":12,"time":<<<\d+>>>},{"asserts":[{"line":21,"success":true},{"line":21,"success":true},{"line":23,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"Accept","value":"text/plain"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/follow-redirect"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"267"},{"name":"Location","value":"http://localhost:8000/following-redirect"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":302},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":3,"line":19,"time":<<<\d+>>>},{"asserts":[{"line":31,"success":true},{"line":31,"success":true},{"line":34,"success":true},{"line":33,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"Accept","value":"text/plain"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/follow-redirect"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"267"},{"name":"Location","value":"http://localhost:8000/following-redirect"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":302},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}},{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"Accept","value":"text/plain"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/following-redirect"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"70"},{"name":"Location","value":"http://localhost:8000/followed-redirect"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":302},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}},{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"Accept","value":"text/plain"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/followed-redirect"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"18"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":4,"line":27,"time":<<<\d+>>>},{"asserts":[{"line":39,"success":true},{"line":39,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/captures"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Header1","value":"value1"},{"name":"Header2","value":"Hello Bob!"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[{"name":"param1","value":"value1"},{"name":"param2","value":"Bob"},{"name":"param3","value":"Bob"},{"name":"data1","value":"Hello world!"},{"name":"data2","value":"Hello world!"}],"index":5,"line":38,"time":<<<\d+>>>},{"asserts":[{"line":50,"success":true},{"line":50,"success":true},{"line":52,"success":true},{"line":53,"success":true},{"line":54,"success":true},{"line":55,"success":true}],"calls":[{"request":{"cookies":[{"name":"cookie2","value":"valueA"}],"headers":[{"name":"Host","value":"localhost:8000"},{"name":"Accept","value":"*/*"},{"name":"Cookie","value":"cookie2=valueA"},{"name":"User-Agent","value":"hurl/<<<.*?>>>"}],"method":"GET","query_string":[],"url":"http://localhost:8000/assert-json"},"response":{"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/<<<.*?>>> Python/<<<.*?>>>"},{"name":"Date","value":"<<<.*?>>>"},{"name":"Content-Type","value":"application/json"},{"name":"Content-Length","value":"357"},{"name":"Server","value":"Flask Server"},{"name":"Connection","value":"close"}],"http_version":"HTTP/1.1","status":200},"timings":{"app_connect":<<<\d+>>>,"begin_call":"<<<.*?>>>","connect":<<<\d+>>>,"end_call":"<<<.*?>>>","name_lookup":<<<\d+>>>,"pre_transfer":<<<\d+>>>,"start_transfer":<<<\d+>>>,"total":<<<\d+>>>}}],"captures":[],"index":6,"line":49,"time":<<<\d+>>>}],"filename":"tests_ok/json_output.hurl","success":true,"time":<<<\d+>>>} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Set-StrictMode -Version latest | ||
$ErrorActionPreference = 'Stop' | ||
hurl --json --verbose tests_ok/json_output.hurl | ||
hurl --json tests_ok/json_output.hurl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
hurl --json --verbose tests_ok/json_output.hurl | ||
hurl --json tests_ok/json_output.hurl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters