MCPcopy Index your code
hub / github.com/expr-lang/expr / TestOutputFormatTabDelimiter

Function TestOutputFormatTabDelimiter

internal/difflib/difflib_test.go:319–341  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

317}
318
319func 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
343func TestOutputFormatNoTrailingTabOnEmptyFiledate(t *testing.T) {
344 diff := UnifiedDiff{

Callers

nothing calls this directly

Calls 6

splitCharsFunction · 0.85
GetUnifiedDiffStringFunction · 0.85
assertEqualFunction · 0.85
SplitLinesFunction · 0.85
GetContextDiffStringFunction · 0.85
ContextDiffTypeAlias · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…