(t *testing.T)
| 327 | } |
| 328 | |
| 329 | func TestOutputFormatTabDelimiter(t *testing.T) { |
| 330 | diff := LineDiffParams{ |
| 331 | A: splitChars("one"), |
| 332 | B: splitChars("two"), |
| 333 | FromFile: "Original", |
| 334 | FromDate: "2005-01-26 23:30:50", |
| 335 | ToFile: "Current", |
| 336 | ToDate: "2010-04-12 10:20:52", |
| 337 | Eol: "\n", |
| 338 | } |
| 339 | ud, err := GetUnifiedDiffString(diff) |
| 340 | assertEqual(t, err, nil) |
| 341 | assertEqual(t, SplitLines(ud)[:2], []string{ |
| 342 | "--- Original\t2005-01-26 23:30:50\n", |
| 343 | "+++ Current\t2010-04-12 10:20:52\n", |
| 344 | }) |
| 345 | cd, err := GetContextDiffString(ContextDiff(diff)) |
| 346 | assertEqual(t, err, nil) |
| 347 | assertEqual(t, SplitLines(cd)[:2], []string{ |
| 348 | "*** Original\t2005-01-26 23:30:50\n", |
| 349 | "--- Current\t2010-04-12 10:20:52\n", |
| 350 | }) |
| 351 | } |
| 352 | |
| 353 | func TestOutputFormatNoTrailingTabOnEmptyFiledate(t *testing.T) { |
| 354 | diff := LineDiffParams{ |
nothing calls this directly
no test coverage detected