mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-26 02:09:47 +08:00
import glob tests
This commit is contained in:
parent
d56a9a1c5d
commit
afbda595f6
6
caddy/parse/import_glob0.txt
Normal file
6
caddy/parse/import_glob0.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
glob0.host0 {
|
||||
dir2 arg1
|
||||
}
|
||||
|
||||
glob0.host1 {
|
||||
}
|
4
caddy/parse/import_glob1.txt
Normal file
4
caddy/parse/import_glob1.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
glob1.host0 {
|
||||
dir1
|
||||
dir2 arg1
|
||||
}
|
3
caddy/parse/import_glob2.txt
Normal file
3
caddy/parse/import_glob2.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
glob2.host0 {
|
||||
dir2 arg1
|
||||
}
|
|
@ -329,6 +329,13 @@ func TestParseAll(t *testing.T) {
|
|||
[]address{{"host1.com", "http"}, {"host2.com", "http"}},
|
||||
[]address{{"host3.com", "https"}, {"host4.com", "https"}},
|
||||
}},
|
||||
|
||||
{`import import_glob*.txt`, false, [][]address{
|
||||
[]address{{"glob0.host0", ""}},
|
||||
[]address{{"glob0.host1", ""}},
|
||||
[]address{{"glob1.host0", ""}},
|
||||
[]address{{"glob2.host0", ""}},
|
||||
}},
|
||||
} {
|
||||
p := testParser(test.input)
|
||||
blocks, err := p.parseAll()
|
||||
|
|
Loading…
Reference in New Issue
Block a user