summaryrefslogtreecommitdiff
path: root/lua/tests/automated/entry_display_spec.lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2022-04-03 13:33:33 +0200
committerSimon Hauser <Simon-Hauser@outlook.de>2022-04-03 13:33:33 +0200
commit6e7ee3829225d5c97c1ebfff686050142ffe5867 (patch)
tree87504b1f83bd421cb7c7bf2a30be031cbad99537 /lua/tests/automated/entry_display_spec.lua
parentd38ad438f3bb4e3721b9964172c8c9d70d5d06a8 (diff)
chore: reformat with stylua 0.13
Diffstat (limited to 'lua/tests/automated/entry_display_spec.lua')
-rw-r--r--lua/tests/automated/entry_display_spec.lua32
1 files changed, 15 insertions, 17 deletions
diff --git a/lua/tests/automated/entry_display_spec.lua b/lua/tests/automated/entry_display_spec.lua
index b57e3a3..a09ccae 100644
--- a/lua/tests/automated/entry_display_spec.lua
+++ b/lua/tests/automated/entry_display_spec.lua
@@ -2,23 +2,21 @@ 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],