summaryrefslogtreecommitdiff
path: root/lua/tests/automated/entry_display_spec.lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2022-01-31 20:34:53 +0100
committerGitHub <noreply@github.com>2022-01-31 20:34:53 +0100
commitf262e7d56d37625613c5de0df5a933cccacf13c5 (patch)
tree8fc32ade9ebd4b04701dfbd9741ad52e5e154ec5 /lua/tests/automated/entry_display_spec.lua
parent3a3c9a3c8ba3fb14121ef5c50a87173dcb969416 (diff)
chore: format with stylua 0.12.0 (#1730)
Diffstat (limited to 'lua/tests/automated/entry_display_spec.lua')
-rw-r--r--lua/tests/automated/entry_display_spec.lua32
1 files changed, 17 insertions, 15 deletions
diff --git a/lua/tests/automated/entry_display_spec.lua b/lua/tests/automated/entry_display_spec.lua
index a09ccae..b57e3a3 100644
--- a/lua/tests/automated/entry_display_spec.lua
+++ b/lua/tests/automated/entry_display_spec.lua
@@ -2,21 +2,23 @@ local entry_display = require "telescope.pickers.entry_display"
describe("truncate", function()
for _, ambiwidth in ipairs { "single", "double" } do
- for _, case in ipairs {
- { args = { "abcde", 6 }, expected = { single = "abcde", double = "abcde" } },
- { args = { "abcde", 5 }, expected = { single = "abcde", double = "abcde" } },
- { args = { "abcde", 4 }, expected = { single = "abc…", double = "ab…" } },
- { args = { "アイウエオ", 11 }, expected = { single = "アイウエオ", double = "アイウエオ" } },
- { args = { "アイウエオ", 10 }, expected = { single = "アイウエオ", double = "アイウエオ" } },
- { args = { "アイウエオ", 9 }, expected = { single = "アイウエ…", double = "アイウ…" } },
- { args = { "アイウエオ", 8 }, expected = { single = "アイウ…", double = "アイウ…" } },
- { args = { "├─┤", 7 }, expected = { single = "├─┤", double = "├─┤" } },
- { args = { "├─┤", 6 }, expected = { single = "├─┤", double = "├─┤" } },
- { args = { "├─┤", 5 }, expected = { single = "├─┤", double = "├…" } },
- { args = { "├─┤", 4 }, expected = { single = "├─┤", double = "├…" } },
- { args = { "├─┤", 3 }, expected = { single = "├─┤", double = "…" } },
- { args = { "├─┤", 2 }, expected = { single = "├…", double = "…" } },
- } do
+ for _, case in
+ ipairs {
+ { args = { "abcde", 6 }, expected = { single = "abcde", double = "abcde" } },
+ { args = { "abcde", 5 }, expected = { single = "abcde", double = "abcde" } },
+ { args = { "abcde", 4 }, expected = { single = "abc…", double = "ab…" } },
+ { args = { "アイウエオ", 11 }, expected = { single = "アイウエオ", double = "アイウエオ" } },
+ { args = { "アイウエオ", 10 }, expected = { single = "アイウエオ", double = "アイウエオ" } },
+ { args = { "アイウエオ", 9 }, expected = { single = "アイウエ…", double = "アイウ…" } },
+ { args = { "アイウエオ", 8 }, expected = { single = "アイウ…", double = "アイウ…" } },
+ { args = { "├─┤", 7 }, expected = { single = "├─┤", double = "├─┤" } },
+ { args = { "├─┤", 6 }, expected = { single = "├─┤", double = "├─┤" } },
+ { args = { "├─┤", 5 }, expected = { single = "├─┤", double = "├…" } },
+ { args = { "├─┤", 4 }, expected = { single = "├─┤", double = "├…" } },
+ { args = { "├─┤", 3 }, expected = { single = "├─┤", double = "…" } },
+ { args = { "├─┤", 2 }, expected = { single = "├…", double = "…" } },
+ }
+ do
local msg = ("can truncate: ambiwidth = %s, [%s, %d] -> %s"):format(
ambiwidth,
case.args[1],