Sha256: 7bc2c63bada26900a4b26a105c0e89447004936f617844bb3c55fcec9e43b46f
Contents?: true
Size: 484 Bytes
Versions: 87
Compression:
Stored size: 484 Bytes
Contents
package fzf import ( "testing" "github.com/junegunn/fzf/src/util" ) func TestStringPtr(t *testing.T) { orig := []byte("\x1b[34mfoo") text := []byte("\x1b[34mbar") item := Item{origText: &orig, text: util.ToChars(text)} if item.AsString(true) != "foo" || item.AsString(false) != string(orig) { t.Fail() } if item.AsString(true) != "foo" { t.Fail() } item.origText = nil if item.AsString(true) != string(text) || item.AsString(false) != string(text) { t.Fail() } }
Version data entries
87 entries across 87 versions & 1 rubygems