mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 03:03:14 -05:00 
			
		
		
		
	
		
			
	
	
		
			12 lines
		
	
	
		
			182 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			12 lines
		
	
	
		
			182 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package test
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import "testing"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func TestTempFile(t *testing.T) {
							 | 
						||
| 
								 | 
							
									_, f, e := TempFile(t, ".", "test")
							 | 
						||
| 
								 | 
							
									if e != nil {
							 | 
						||
| 
								 | 
							
										t.Fatalf("failed to create temp file: %s", e)
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									defer f()
							 | 
						||
| 
								 | 
							
								}
							 |