()
| 949 | |
| 950 | #[test] |
| 951 | fn test_diff_stats() { |
| 952 | let old = b"a\nb\nc\n"; |
| 953 | let new = b"a\nx\ny\nc\n"; |
| 954 | let diff = UnifiedDiff::new(old, new, Algorithm::Myers); |
| 955 | |
| 956 | let stats = DiffStats::from_diff(diff.diff_result()); |
| 957 | assert_eq!(stats.files_changed, 1); |
| 958 | assert!(stats.lines_added > 0 || stats.lines_removed > 0); |
| 959 | } |
| 960 | |
| 961 | #[test] |
| 962 | fn test_diff_stats_display() { |
nothing calls this directly
no test coverage detected