X-Git-Url: https://git.r.bdr.sh/rbdr/page/blobdiff_plain/b03284133baa6339fe4adf48e4a6499ef3ac287b..3f1aa0b6eb90bd7912a63c6b72c2571486fbc21f:/src/file_finder.rs?ds=sidebyside diff --git a/src/file_finder.rs b/src/file_finder.rs index a9b84f8..ef57950 100644 --- a/src/file_finder.rs +++ b/src/file_finder.rs @@ -17,7 +17,7 @@ fn find_files_recursively(root_path: &PathBuf, directory_path: &PathBuf) -> Vec< continue; } if path.is_dir() { - result.append(&mut find_files_recursively(root_path, &path)) + result.append(&mut find_files_recursively(root_path, &path)); } else { let file_type = file_handler.identify(&path); result.push(File { path, file_type }); @@ -78,6 +78,7 @@ mod tests { create_dir_all(test_dir.join("nested")).expect("Could not create nested test directory"); create_dir_all(test_dir.join("assets")).expect("Could not create assets test directory"); create_test_file(&test_dir.join("_layout.html"), ""); + create_test_file(&test_dir.join("notalayout.html"), ""); create_test_file(&test_dir.join("nested/nested.gmi"), ""); create_test_file(&test_dir.join("assets/style.css"), ""); create_test_file(&test_dir.join("image.png"), ""); @@ -89,9 +90,9 @@ mod tests { Some("gmi") => assert_eq!(file.file_type, FileType::Gemini), Some("html") => { if file.path.ends_with("_layout.html") { - assert_eq!(file.file_type, FileType::Layout) + assert_eq!(file.file_type, FileType::Layout); } else { - assert_eq!(file.file_type, FileType::File) + assert_eq!(file.file_type, FileType::File); } } _ => assert_eq!(file.file_type, FileType::File),