Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
94100a7b
Commit
94100a7b
authored
Jan 04, 2016
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests
parent
e9c2e506
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
caddy/parse/parsing_test.go
caddy/parse/parsing_test.go
+11
-4
No files found.
caddy/parse/parsing_test.go
View file @
94100a7b
...
@@ -335,10 +335,10 @@ func TestParseAll(t *testing.T) {
...
@@ -335,10 +335,10 @@ func TestParseAll(t *testing.T) {
}},
}},
{
`import import_glob*.txt`
,
false
,
[][]
address
{
{
`import import_glob*.txt`
,
false
,
[][]
address
{
[]
address
{{
"glob0.host0"
,
""
}},
[]
address
{{
"glob0.host0"
,
""
,
"glob0.host0"
,
""
}},
[]
address
{{
"glob0.host1"
,
""
}},
[]
address
{{
"glob0.host1"
,
""
,
"glob0.host1"
,
""
}},
[]
address
{{
"glob1.host0"
,
""
}},
[]
address
{{
"glob1.host0"
,
""
,
"glob1.host0"
,
""
}},
[]
address
{{
"glob2.host0"
,
""
}},
[]
address
{{
"glob2.host0"
,
""
,
"glob2.host0"
,
""
}},
}},
}},
}
{
}
{
p
:=
testParser
(
test
.
input
)
p
:=
testParser
(
test
.
input
)
...
@@ -450,6 +450,13 @@ func TestEnvironmentReplacement(t *testing.T) {
...
@@ -450,6 +450,13 @@ func TestEnvironmentReplacement(t *testing.T) {
if
actual
,
expected
:=
blocks
[
0
]
.
Addresses
[
0
]
.
Port
,
""
;
expected
!=
actual
{
if
actual
,
expected
:=
blocks
[
0
]
.
Addresses
[
0
]
.
Port
,
""
;
expected
!=
actual
{
t
.
Errorf
(
"Expected port to be '%s' but was '%s'"
,
expected
,
actual
)
t
.
Errorf
(
"Expected port to be '%s' but was '%s'"
,
expected
,
actual
)
}
}
// in quoted field
p
=
testParser
(
":1234
\n
dir1
\"
Test {$FOOBAR} test
\"
"
)
blocks
,
_
=
p
.
parseAll
()
if
actual
,
expected
:=
blocks
[
0
]
.
Tokens
[
"dir1"
][
1
]
.
text
,
"Test foobar test"
;
expected
!=
actual
{
t
.
Errorf
(
"Expected argument to be '%s' but was '%s'"
,
expected
,
actual
)
}
}
}
func
setupParseTests
()
{
func
setupParseTests
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment