summaryrefslogtreecommitdiff
path: root/src/ansi_test.go
diff options
context:
space:
mode:
authorZhizhen He <hezhizhen.yi@gmail.com>2024-05-18 16:06:33 +0800
committerGitHub <noreply@github.com>2024-05-18 17:06:33 +0900
commit01e7668915c4e3cf8c9eeca283d41beac924fe1f (patch)
tree721306578106c58da6cdb0c04543eaba53b7d5a1 /src/ansi_test.go
parent0994d9c881f8380997b96bb0a4a7416b50bc2b0d (diff)
downloadfzf-01e7668915c4e3cf8c9eeca283d41beac924fe1f.tar.gz
chore: use strings.ReplaceAll (#3801)
Diffstat (limited to 'src/ansi_test.go')
-rw-r--r--src/ansi_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ansi_test.go b/src/ansi_test.go
index b5481e5f..55f7fc08 100644
--- a/src/ansi_test.go
+++ b/src/ansi_test.go
@@ -342,8 +342,8 @@ func TestAnsiCodeStringConversion(t *testing.T) {
state := interpretCode(code, prevState)
if expected != state.ToString() {
t.Errorf("expected: %s, actual: %s",
- strings.Replace(expected, "\x1b[", "\\x1b[", -1),
- strings.Replace(state.ToString(), "\x1b[", "\\x1b[", -1))
+ strings.ReplaceAll(expected, "\x1b[", "\\x1b["),
+ strings.ReplaceAll(state.ToString(), "\x1b[", "\\x1b["))
}
}
assert("\x1b[m", nil, "")