diff --git a/src/test.rs b/src/test.rs index 032c20b..ffc65e3 100644 --- a/src/test.rs +++ b/src/test.rs @@ -29,6 +29,13 @@ mod tests { process_lines("changeLog".to_string(), Box::new(BufReader::new(file))) } + #[test] + #[ignore = "Empty file section handling is not implemented"] + fn test_empty_file_section() { + let file = fs::File::open("test_data/empty_file_section.diff").unwrap(); + process_lines("mingw".to_string(), Box::new(BufReader::new(file))) + } + #[test] fn test_parse_args() { let config = parse_args(&vec!["asd"]); diff --git a/test_data/empty_file_section.diff b/test_data/empty_file_section.diff new file mode 100644 index 0000000..59e6c20 --- /dev/null +++ b/test_data/empty_file_section.diff @@ -0,0 +1,29 @@ +commit 7fd9fd94fb8f23b86578ed86906b8caf0417db82 +Merge: 5fa0f5238b d9589d4051 +Author: REDACTED +Date: Wed Dec 4 23:06:31 2019 +0100 + + Sync with 2.22.2 + + * maint-2.22: (43 commits) + Git 2.22.2 + Git 2.21.1 + mingw: sh arguments need quoting in more circumstances + mingw: fix quoting of empty arguments for `sh` + mingw: use MSYS2 quoting even when spawning shell scripts + mingw: detect when MSYS2's sh is to be spawned more robustly + t7415: drop v2.20.x-specific work-around + Git 2.20.2 + t7415: adjust test for dubiously-nested submodule gitdirs for v2.20.x + Git 2.19.3 + Git 2.18.2 + Git 2.17.3 + Git 2.16.6 + test-drop-caches: use `has_dos_drive_prefix()` + Git 2.15.4 + Git 2.14.6 + mingw: handle `subst`-ed "DOS drives" + mingw: refuse to access paths with trailing spaces or periods + mingw: refuse to access paths with illegal characters + unpack-trees: let merged_entry() pass through do_add_entry()'s errors + ...