mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 10:43:20 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			331 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			331 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package test
 | 
						|
 | 
						|
import (
 | 
						|
	"testing"
 | 
						|
)
 | 
						|
 | 
						|
func TestCorefile1(t *testing.T) {
 | 
						|
	defer func() {
 | 
						|
		if r := recover(); r != nil {
 | 
						|
			t.Fatalf("Expected no panic, but got %v", r)
 | 
						|
		}
 | 
						|
	}()
 | 
						|
 | 
						|
	// this used to crash
 | 
						|
	corefile := `\\\\ȶ.
 | 
						|
acl
 | 
						|
`
 | 
						|
	i, _, _, _ := CoreDNSServerAndPorts(corefile)
 | 
						|
	defer func() {
 | 
						|
		if i != nil {
 | 
						|
			i.Stop()
 | 
						|
		}
 | 
						|
	}()
 | 
						|
}
 |