mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 18:23:13 -04: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()
 | |
| 		}
 | |
| 	}()
 | |
| }
 |