(t *testing.T)
| 317 | } |
| 318 | |
| 319 | func TestOutputFormatTabDelimiter(t *testing.T) { |
| 320 | diff := UnifiedDiff{ |
| 321 | A: splitChars("one"), |
| 322 | B: splitChars("two"), |
| 323 | FromFile: "Original", |
| 324 | FromDate: "2005-01-26 23:30:50", |
| 325 | ToFile: "Current", |
| 326 | ToDate: "2010-04-12 10:20:52", |
| 327 | Eol: "\n", |
| 328 | } |
| 329 | ud, err := GetUnifiedDiffString(diff) |
| 330 | assertEqual(t, err, nil) |
| 331 | assertEqual(t, SplitLines(ud)[:2], []string{ |
| 332 | "--- Original\t2005-01-26 23:30:50\n", |
| 333 | "+++ Current\t2010-04-12 10:20:52\n", |
| 334 | }) |
| 335 | cd, err := GetContextDiffString(ContextDiff(diff)) |
| 336 | assertEqual(t, err, nil) |
| 337 | assertEqual(t, SplitLines(cd)[:2], []string{ |
| 338 | "*** Original\t2005-01-26 23:30:50\n", |
| 339 | "--- Current\t2010-04-12 10:20:52\n", |
| 340 | }) |
| 341 | } |
| 342 | |
| 343 | func TestOutputFormatNoTrailingTabOnEmptyFiledate(t *testing.T) { |
| 344 | diff := UnifiedDiff{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…