Skip to content

Commit 730049f

Browse files
committed
the patch is not created for all tests
1 parent da846d7 commit 730049f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cpp-linter/tests/comments.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,11 @@ async fn setup(lib_root: &Path, tmp_dir: &TempDir, test_params: &TestParams) {
278278
.path()
279279
.join(".cpp-linter-cache")
280280
.join("auto_fix.patch");
281-
let patch_content =
282-
std::fs::read_to_string(patch_path).expect("Failed to read generated patch file.");
283-
println!("Generated patch content:\n{patch_content}");
281+
if patch_path.exists() {
282+
let patch_content =
283+
std::fs::read_to_string(patch_path).expect("Failed to read generated patch file.");
284+
println!("Generated patch content:\n{patch_content}");
285+
}
284286
}
285287

286288
async fn test_comment(test_params: &TestParams) {

0 commit comments

Comments
 (0)