Recursively collect all .hll files from a directory tree
(dir: &PathBuf, files: &mut Vec<PathBuf>)
| 11 | |
| 12 | fn collect_hll_files(dir: &PathBuf, files: &mut Vec<PathBuf>) { |
| 13 | if let Ok(entries) = fs::read_dir(dir) { |
| 14 | for entry in entries.filter_map(Result::ok) { |
| 15 | let path = entry.path(); |
| 16 | if path.is_dir() { |
| 17 | collect_hll_files(&path, files); |
| 18 | } else if path.extension().and_then(|e| e.to_str()) == Some("hll") { |
| 19 | files.push(path); |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | #[test] |
| 26 | fn execute_compiler_test_suite() { |
| 27 | let root = suite_root(); |