Commit 56045686 authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

mw/auto: increate setup coverage (#967)

Fixes #965
parent 8931ede1
...@@ -31,6 +31,7 @@ func TestAutoParse(t *testing.T) { ...@@ -31,6 +31,7 @@ func TestAutoParse(t *testing.T) {
{ {
`auto { `auto {
directory /tmp directory /tmp
no_reload
}`, }`,
false, "/tmp", "${1}", `db\.(.*)`, nil, false, "/tmp", "${1}", `db\.(.*)`, nil,
}, },
...@@ -40,6 +41,12 @@ func TestAutoParse(t *testing.T) { ...@@ -40,6 +41,12 @@ func TestAutoParse(t *testing.T) {
}`, }`,
false, "/tmp", "bliep", `(.*)`, nil, false, "/tmp", "bliep", `(.*)`, nil,
}, },
{
`auto {
directory /tmp (.*) bliep 10
}`,
false, "/tmp", "bliep", `(.*)`, nil,
},
{ {
`auto { `auto {
directory /tmp (.*) bliep directory /tmp (.*) bliep
...@@ -62,6 +69,24 @@ func TestAutoParse(t *testing.T) { ...@@ -62,6 +69,24 @@ func TestAutoParse(t *testing.T) {
}`, }`,
true, "", "${1}", ``, nil, true, "", "${1}", ``, nil,
}, },
{
`auto example.org {
directory /tmp * {1} aa
}`,
true, "", "${1}", ``, nil,
},
{
`auto example.org {
directory /tmp .* {1}
}`,
true, "", "${1}", ``, nil,
},
{
`auto example.org {
directory /tmp .* {1}
}`,
true, "", "${1}", ``, nil,
},
{ {
`auto example.org { `auto example.org {
directory /tmp .* {1} directory /tmp .* {1}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment