Fix html export

This commit is contained in:
Fabrice Reix 2020-12-04 21:18:19 +01:00
parent f3fd06945f
commit 833e2bf157
5 changed files with 12 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-status-code</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">201</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="comment"># simply check that the status code is not 200</span></span><span class="line"><span class="comment"># do not run implicit assert of http response version and code</span></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-status-code</span></span></div><div class="response"><span class="line"><span class="version">HTTP/*</span> <span class="status">*</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">status</span> not <span class="predicate-type">equals</span> <span class="number">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"></span><span class="line"><span class="comment"># simply check that the status code is OK</span></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-status-code</span></span></div><div class="response"><span class="line"><span class="version">HTTP/*</span> <span class="status">*</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">status</span> <span class="predicate-type">greater-than-or-equal</span> <span class="number">200</span></span><span class="line"><span class="query-type">status</span> <span class="predicate-type">less-than</span> <span class="number">300</span></span></div></div></div>
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-status-code</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">201</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"><span class="comment"># simply check that the status code is not 200</span></span><span class="line"><span class="comment"># do not run implicit assert of http response version and code</span></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-status-code</span></span></div><div class="response"><span class="line"><span class="version">HTTP/*</span> <span class="status">*</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">status</span> not <span class="predicate-type">equals</span> <span class="number">200</span></span></div></div><div class="hurl-entry"><div class="request"><span class="line"></span><span class="line"></span><span class="line"><span class="comment"># simply check that the status code is OK</span></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/assert-status-code</span></span></div><div class="response"><span class="line"><span class="version">HTTP/*</span> <span class="status">*</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">status</span> <span class="predicate-type">greaterThanOrEquals</span> <span class="number">200</span></span><span class="line"><span class="query-type">status</span> <span class="predicate-type">lessThan</span> <span class="number">300</span></span></div></div></div>

View File

@ -1 +1 @@
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/error-assert-value</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">header</span> <span class="string">"content-type"</span> <span class="predicate-type">equals</span> <span class="string">"XXX"</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.id"</span> <span class="predicate-type">equals</span> <span class="string">"000001"</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.values"</span> <span class="predicate-type">includes</span> <span class="number">100</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.values"</span> not <span class="predicate-type">contains</span> <span class="string">"Hello"</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.count"</span> <span class="predicate-type">greater-than</span> <span class="number">5</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.count"</span> <span class="predicate-type">isFloat</span></span></div></div></div>
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/error-assert-value</span></span></div><div class="response"><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">header</span> <span class="string">"content-type"</span> <span class="predicate-type">equals</span> <span class="string">"XXX"</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.id"</span> <span class="predicate-type">equals</span> <span class="string">"000001"</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.values"</span> <span class="predicate-type">includes</span> <span class="number">100</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.values"</span> not <span class="predicate-type">contains</span> <span class="string">"Hello"</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.count"</span> <span class="predicate-type">greaterThan</span> <span class="number">5</span></span><span class="line"><span class="query-type">jsonpath</span> <span class="string">"$.count"</span> <span class="predicate-type">isFloat</span></span></div></div></div>

View File

@ -1 +1 @@
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/large</span></span></div><div class="response"><span class="line"></span><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line"><span class="string">Content-Type</span><span>:</span> <span class="string">application/octet-stream</span></span><span class="line"><span class="string">Content-Length</span><span>:</span> <span class="string">536870912</span></span><span class="line"></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">duration</span> <span class="predicate-type">less-than-or-equal</span> <span class="number">10000</span></span></div></div><span class="line"></span><span class="line"></span><span class="line"></span></div>
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/large</span></span></div><div class="response"><span class="line"></span><span class="line"><span class="version">HTTP/1.0</span> <span class="status">200</span></span><span class="line"><span class="string">Content-Type</span><span>:</span> <span class="string">application/octet-stream</span></span><span class="line"><span class="string">Content-Length</span><span>:</span> <span class="string">536870912</span></span><span class="line"></span><span class="line section-header">[Asserts]</span></span><span class="line"><span class="query-type">duration</span> <span class="predicate-type">lessThanOrEquals</span> <span class="number">10000</span></span></div></div><span class="line"></span><span class="line"></span><span class="line"></span></div>

View File

@ -464,56 +464,56 @@ impl Htmlable for PredicateFuncValue {
);
}
PredicateFuncValue::GreaterThanInt { space0, value } => {
buffer.push_str("<span class=\"predicate-type\">greater-than</span>");
buffer.push_str("<span class=\"predicate-type\">greaterThan</span>");
buffer.push_str(space0.to_html().as_str());
buffer.push_str(
format!("<span class=\"number\">{}</span>", value.to_string()).as_str(),
);
}
PredicateFuncValue::GreaterThanFloat { space0, value } => {
buffer.push_str("<span class=\"predicate-type\">greater-than</span>");
buffer.push_str("<span class=\"predicate-type\">greaterThan</span>");
buffer.push_str(space0.to_html().as_str());
buffer.push_str(
format!("<span class=\"number\">{}</span>", value.to_string()).as_str(),
);
}
PredicateFuncValue::GreaterThanOrEqualInt { space0, value } => {
buffer.push_str("<span class=\"predicate-type\">greater-than-or-equal</span>");
buffer.push_str("<span class=\"predicate-type\">greaterThanOrEquals</span>");
buffer.push_str(space0.to_html().as_str());
buffer.push_str(
format!("<span class=\"number\">{}</span>", value.to_string()).as_str(),
);
}
PredicateFuncValue::GreaterThanOrEqualFloat { space0, value } => {
buffer.push_str("<span class=\"predicate-type\">greater-than-or-equal</span>");
buffer.push_str("<span class=\"predicate-type\">greaterThanOrEquals</span>");
buffer.push_str(space0.to_html().as_str());
buffer.push_str(
format!("<span class=\"number\">{}</span>", value.to_string()).as_str(),
);
}
PredicateFuncValue::LessThanInt { space0, value } => {
buffer.push_str("<span class=\"predicate-type\">less-than</span>");
buffer.push_str("<span class=\"predicate-type\">lessThan</span>");
buffer.push_str(space0.to_html().as_str());
buffer.push_str(
format!("<span class=\"number\">{}</span>", value.to_string()).as_str(),
);
}
PredicateFuncValue::LessThanFloat { space0, value } => {
buffer.push_str("<span class=\"predicate-type\">less-than</span>");
buffer.push_str("<span class=\"predicate-type\">lessThan</span>");
buffer.push_str(space0.to_html().as_str());
buffer.push_str(
format!("<span class=\"number\">{}</span>", value.to_string()).as_str(),
);
}
PredicateFuncValue::LessThanOrEqualInt { space0, value } => {
buffer.push_str("<span class=\"predicate-type\">less-than-or-equal</span>");
buffer.push_str("<span class=\"predicate-type\">lessThanOrEquals</span>");
buffer.push_str(space0.to_html().as_str());
buffer.push_str(
format!("<span class=\"number\">{}</span>", value.to_string()).as_str(),
);
}
PredicateFuncValue::LessThanOrEqualFloat { space0, value } => {
buffer.push_str("<span class=\"predicate-type\">less-than-or-equal</span>");
buffer.push_str("<span class=\"predicate-type\">lessThanOrEquals</span>");
buffer.push_str(space0.to_html().as_str());
buffer.push_str(
format!("<span class=\"number\">{}</span>", value.to_string()).as_str(),