MCPcopy Create free account
hub / github.com/cogentcore/core / TestSFBugsComparingEmptyLists

Function TestSFBugsComparingEmptyLists

texteditor/difflib/bytes/bytes_test.go:313–324  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

311}
312
313func TestSFBugsComparingEmptyLists(t *testing.T) {
314 groups := NewMatcher(nil, nil).GetGroupedOpCodes(-1)
315 assertEqual(t, len(groups), 0)
316 diff := UnifiedDiff{
317 FromFile: "Original",
318 ToFile: "Current",
319 Context: 3,
320 }
321 result, err := GetUnifiedDiffString(diff)
322 assertEqual(t, err, nil)
323 assertEqual(t, string(result), "")
324}
325
326func TestOutputFormatRangeFormatUnified(t *testing.T) {
327 // Per the diff spec at http://www.unix.org/single_unix_specification/

Callers

nothing calls this directly

Calls 4

NewMatcherFunction · 0.70
assertEqualFunction · 0.70
GetUnifiedDiffStringFunction · 0.70
GetGroupedOpCodesMethod · 0.45

Tested by

no test coverage detected