mirror of
				https://github.com/BurntSushi/ripgrep.git
				synced 2025-10-30 23:17:47 +02:00 
			
		
		
		
	tests: remove existing test directory
I'm surprised this wasn't caught until now, but if a test directory already exists, then it was reused. This can result in hard to debug problems with tests when, e.g., file names are changed and a recursive search is executed.
This commit is contained in:
		| @@ -76,6 +76,9 @@ impl Dir { | ||||
|             .join(TEST_DIR) | ||||
|             .join(name) | ||||
|             .join(&format!("{}", id)); | ||||
|         if dir.exists() { | ||||
|             nice_err(&dir, fs::remove_dir_all(&dir)); | ||||
|         } | ||||
|         nice_err(&dir, repeat(|| fs::create_dir_all(&dir))); | ||||
|         Dir { | ||||
|             root: root, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user