-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do encoding negotiation; add hurl integration tests
- Loading branch information
Showing
21 changed files
with
545 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
go.work* | ||
xtemplate* | ||
templates | ||
caddy |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "xtemplate bin", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "./bin", | ||
"args": ["--template-root", "integration/templates", "--log", "-4"], | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
report | ||
*.log |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
debug | ||
} | ||
|
||
:8080 { | ||
route { | ||
xtemplate { | ||
template_root templates | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Set up xtemplate server and cleanup | ||
echo "Running xtemplate..." | ||
pushd `dirname "$(readlink -f "$0")"` > /dev/null # cd to the directory where this script is | ||
go run ../bin -log -4 > xtemplate.log & # exec go run in the background | ||
PID=$! # grab the pid | ||
exit() { # define exit handler | ||
sleep 0.1s # wait for stdout to flush | ||
kill $PID # kill the process | ||
popd # cd back to wherever the script was invoked from | ||
} | ||
trap exit EXIT # register exit handler | ||
until grep -q -i 'msg=serving' xtemplate.log # wait for the server to start | ||
do | ||
sleep 0.1 | ||
done | ||
echo "" | ||
|
||
# Run tests | ||
hurl --continue-on-error --test --report-html report *.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>You can't see me</p> |
Empty file.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
testing |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!DOCTYPE html> | ||
<link rel="stylesheet" href="/basic.css?hash={{.SRI `/basic.css`}}" integrity="{{.SRI `/basic.css`}}"> | ||
<p>Hello world!</p> |
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 |
---|---|---|
@@ -0,0 +1,236 @@ | ||
p { | ||
background-color: red !important; | ||
} | ||
|
||
*, | ||
::after, | ||
::before { | ||
box-sizing: border-box; | ||
border-width: 0; | ||
border-style: solid; | ||
border-color: #e5e7eb; | ||
content: ''; | ||
} | ||
|
||
html { | ||
line-height: 1.5; | ||
-webkit-text-size-adjust: 100%; | ||
-moz-tab-size: 4; | ||
tab-size: 4; | ||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | ||
font-feature-settings: normal; | ||
font-variation-settings: normal | ||
} | ||
|
||
body { | ||
margin: 0; | ||
line-height: inherit | ||
} | ||
|
||
hr { | ||
height: 0; | ||
color: inherit; | ||
border-top-width: 1px | ||
} | ||
|
||
abbr:where([title]) { | ||
-webkit-text-decoration: underline dotted; | ||
text-decoration: underline dotted | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
font-size: inherit; | ||
font-weight: inherit | ||
} | ||
|
||
a { | ||
color: inherit; | ||
text-decoration: inherit | ||
} | ||
|
||
b, | ||
strong { | ||
font-weight: bolder | ||
} | ||
|
||
code, | ||
kbd, | ||
pre, | ||
samp { | ||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; | ||
font-size: 1em | ||
} | ||
|
||
small { | ||
font-size: 80% | ||
} | ||
|
||
sub, | ||
sup { | ||
font-size: 75%; | ||
line-height: 0; | ||
position: relative; | ||
vertical-align: baseline | ||
} | ||
|
||
sub { | ||
bottom: -.25em | ||
} | ||
|
||
sup { | ||
top: -.5em | ||
} | ||
|
||
table { | ||
text-indent: 0; | ||
border-color: inherit; | ||
border-collapse: collapse | ||
} | ||
|
||
button, | ||
input, | ||
optgroup, | ||
select, | ||
textarea { | ||
font-family: inherit; | ||
font-feature-settings: inherit; | ||
font-variation-settings: inherit; | ||
font-size: 100%; | ||
font-weight: inherit; | ||
line-height: inherit; | ||
color: inherit; | ||
margin: 0; | ||
padding: 0 | ||
} | ||
|
||
button, | ||
select { | ||
text-transform: none | ||
} | ||
|
||
[type=button], | ||
[type=reset], | ||
[type=submit], | ||
button { | ||
-webkit-appearance: button; | ||
background-color: transparent; | ||
background-image: none | ||
} | ||
|
||
:-moz-focusring { | ||
outline: auto | ||
} | ||
|
||
:-moz-ui-invalid { | ||
box-shadow: none | ||
} | ||
|
||
progress { | ||
vertical-align: baseline | ||
} | ||
|
||
::-webkit-inner-spin-button, | ||
::-webkit-outer-spin-button { | ||
height: auto | ||
} | ||
|
||
[type=search] { | ||
-webkit-appearance: textfield; | ||
outline-offset: -2px | ||
} | ||
|
||
::-webkit-search-decoration { | ||
-webkit-appearance: none | ||
} | ||
|
||
::-webkit-file-upload-button { | ||
-webkit-appearance: button; | ||
font: inherit | ||
} | ||
|
||
summary { | ||
display: list-item | ||
} | ||
|
||
blockquote, | ||
dd, | ||
dl, | ||
figure, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
hr, | ||
p, | ||
pre { | ||
margin: 0 | ||
} | ||
|
||
fieldset { | ||
margin: 0; | ||
padding: 0 | ||
} | ||
|
||
legend { | ||
padding: 0 | ||
} | ||
|
||
menu, | ||
ol, | ||
ul { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0 | ||
} | ||
|
||
dialog { | ||
padding: 0 | ||
} | ||
|
||
textarea { | ||
resize: vertical | ||
} | ||
|
||
input::placeholder, | ||
textarea::placeholder { | ||
opacity: 1; | ||
color: #9ca3af | ||
} | ||
|
||
[role=button], | ||
button { | ||
cursor: pointer | ||
} | ||
|
||
:disabled { | ||
cursor: default | ||
} | ||
|
||
audio, | ||
canvas, | ||
embed, | ||
iframe, | ||
img, | ||
object, | ||
svg, | ||
video { | ||
display: block; | ||
vertical-align: middle | ||
} | ||
|
||
img, | ||
video { | ||
max-width: 100%; | ||
height: auto | ||
} | ||
|
||
[hidden] { | ||
display: none | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{template "/_hidden.html". }} | ||
|
||
<p>And now you can</p> |
Oops, something went wrong.