This commit is contained in:
Kovid Goyal
2025-03-23 19:37:23 +05:30
parent 16f7380cb0
commit c73f5ab8a0

View File

@@ -3,8 +3,8 @@ package wcswidth
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"strings"
"os/exec" "os/exec"
"strings"
"testing" "testing"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
@@ -22,7 +22,7 @@ type GraphemeBreakTest struct {
func TestSplitIntoGraphemes(t *testing.T) { func TestSplitIntoGraphemes(t *testing.T) {
var m = map[string][]string{ var m = map[string][]string{
" \u0308 ": []string{" \u0308", " "}, " \u0308 ": []string{" \u0308", " "},
"abc": []string{"a", "b", "c"}, "abc": []string{"a", "b", "c"},
} }
for text, expected := range m { for text, expected := range m {
if diff := cmp.Diff(expected, SplitIntoGraphemes(text)); diff != "" { if diff := cmp.Diff(expected, SplitIntoGraphemes(text)); diff != "" {