MCPcopy
hub / github.com/micro-editor/micro / TestStringWidth

Function TestStringWidth

internal/util/util_test.go:9–14  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestStringWidth(t *testing.T) {
10 bytes := []byte("\tPot să \tmănânc sticlă și ea nu mă rănește.")
11
12 n := StringWidth(bytes, 23, 4)
13 assert.Equal(t, 26, n)
14}
15
16func TestSliceVisualEnd(t *testing.T) {
17 s := []byte("\thello")

Callers

nothing calls this directly

Calls 1

StringWidthFunction · 0.85

Tested by

no test coverage detected