()
| 1722 | #[test] |
| 1723 | #[file_serial] |
| 1724 | fn test_diff_patience_algorithm() { |
| 1725 | let _guard = DirGuard::new(); |
| 1726 | |
| 1727 | let temp_dir = tempfile::tempdir().unwrap(); |
| 1728 | let repo_path = temp_dir.path(); |
| 1729 | |
| 1730 | // Initialize and add a file |
| 1731 | { |
| 1732 | let repo = Repository::init(repo_path).unwrap(); |
| 1733 | std::fs::write(repo_path.join("test.txt"), "Original content\n").unwrap(); |
| 1734 | let working_copy = repo.require_working_copy_id().unwrap(); |
| 1735 | repo.add(working_copy, "test.txt", Default::default()) |
| 1736 | .unwrap(); |
| 1737 | } |
| 1738 | |
| 1739 | std::env::set_current_dir(repo_path).unwrap(); |
| 1740 | |
| 1741 | // Use patience algorithm |
| 1742 | let diff = Diff::new().with_algorithm("patience"); |
| 1743 | let result = diff.run(); |
| 1744 | |
| 1745 | assert!(result.is_ok()); |
| 1746 | } |
| 1747 | |
| 1748 | #[test] |
| 1749 | #[file_serial] |
nothing calls this directly
no test coverage detected