import glob tests

This commit is contained in:
Radim Marek 2015-12-11 21:47:38 +01:00
parent d56a9a1c5d
commit afbda595f6
4 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,6 @@
glob0.host0 {
dir2 arg1
}
glob0.host1 {
}

View File

@ -0,0 +1,4 @@
glob1.host0 {
dir1
dir2 arg1
}

View File

@ -0,0 +1,3 @@
glob2.host0 {
dir2 arg1
}

View File

@ -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()