mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-28 01:02:49 -04:00 
			
		
		
		
	fileserver: Fix new file hide tests on Windows (#3719)
This commit is contained in:
		
							parent
							
								
									0ee4378227
								
							
						
					
					
						commit
						1c5969b576
					
				| @ -161,6 +161,12 @@ func TestFileHidden(t *testing.T) { | ||||
| 			expect:    false, | ||||
| 		}, | ||||
| 	} { | ||||
| 		// for Windows' sake | ||||
| 		tc.inputPath = filepath.FromSlash(tc.inputPath) | ||||
| 		for i := range tc.inputHide { | ||||
| 			tc.inputHide[i] = filepath.FromSlash(tc.inputHide[i]) | ||||
| 		} | ||||
| 
 | ||||
| 		actual := fileHidden(tc.inputPath, tc.inputHide) | ||||
| 		if actual != tc.expect { | ||||
| 			t.Errorf("Test %d: Is %s hidden in %v? Got %t but expected %t", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user