mirror of
https://github.com/caddyserver/caddy.git
synced 2025-12-08 06:09:53 +00:00
caddyfile: Improve Dispenser.NextBlock() to support nesting
This commit is contained in:
parent
0cf592fa2e
commit
2459c292a4
14 changed files with 95 additions and 58 deletions
|
|
@ -148,7 +148,7 @@ func TestDispenser_NextBlock(t *testing.T) {
|
|||
d := newTestDispenser(input)
|
||||
|
||||
assertNextBlock := func(shouldLoad bool, expectedCursor, expectedNesting int) {
|
||||
if loaded := d.NextBlock(); loaded != shouldLoad {
|
||||
if loaded := d.NextBlock(0); loaded != shouldLoad {
|
||||
t.Errorf("NextBlock(): Should return %v but got %v", shouldLoad, loaded)
|
||||
}
|
||||
if d.cursor != expectedCursor {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue