MCPcopy Index your code
hub / github.com/codechenx/FastTableViewer / TestSepDetect_InconsistentSeparators

Function TestSepDetect_InconsistentSeparators

sepDector_test.go:77–91  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

75}
76
77func TestSepDetect_InconsistentSeparators(t *testing.T) {
78 sd := sepDetecor{}
79 lines := []string{
80 "Name,Age,City",
81 "Alice|30|NYC",
82 "Bob\t25\tLA",
83 }
84
85 // Should detect the most consistent separator
86 sep := sd.sepDetect(lines)
87 // Any valid separator is acceptable here
88 // With inconsistent separators, detection may fail (return 0)
89 // or detect the first consistent one
90 t.Logf("Detected separator for inconsistent input: %c (code: %d)", sep, sep)
91}
92
93func TestIsValidSeparator(t *testing.T) {
94 sd := sepDetecor{}

Callers

nothing calls this directly

Calls 1

sepDetectMethod · 0.95

Tested by

no test coverage detected