Fix test failure

This commit is contained in:
Junegunn Choi
2026-02-19 21:37:19 +09:00
parent 4a195e6323
commit 4a684b6c78
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -4369,7 +4369,7 @@ Loop:
prefixWidth := t.pwindow.X() prefixWidth := t.pwindow.X()
var url *url var url *url
_, _, ansi = extractColor(subLine, ansi, func(str string, ansi *ansiState) bool { _, _, ansi = extractColor(subLine, ansi, func(str string, ansi *ansiState) bool {
if fillRet == tui.FillNextLine { if len(str) > 0 && fillRet == tui.FillNextLine {
printWrapSign() printWrapSign()
prefixWidth = t.pwindow.X() prefixWidth = t.pwindow.X()
} }
+6 -6
View File
@@ -587,8 +587,8 @@ class TestPreview < TestInteractive
tmux.send_keys %(seq 1 | #{FZF} --preview 'echo -e "\\x1b[33m1234567890 \\x1b[mhello"; echo -e "\\x1b[33m1234567890 \\x1b[mhello"' --preview-window 10,wrap-word), :Enter tmux.send_keys %(seq 1 | #{FZF} --preview 'echo -e "\\x1b[33m1234567890 \\x1b[mhello"; echo -e "\\x1b[33m1234567890 \\x1b[mhello"' --preview-window 10,wrap-word), :Enter
tmux.until do |lines| tmux.until do |lines|
assert_equal 1, lines.match_count assert_equal 1, lines.match_count
assert_equal 2, lines.count { |line| line.include?('│ 1234567890 │') } assert_equal(2, lines.count { |line| line.include?('│ 1234567890 │') })
assert_equal 2, lines.count { |line| line.include?('│ ↳ hello │') } assert_equal(2, lines.count { |line| line.include?('│ ↳ hello │') })
end end
end end
@@ -596,8 +596,8 @@ class TestPreview < TestInteractive
tmux.send_keys %(seq 1 | #{FZF} --preview 'echo -e "\\x1b[33m1234567890 \\x1b[mhello"; echo -e "\\x1b[33m1234567890 \\x1b[mhello"' --preview-window 2,wrap-word), :Enter tmux.send_keys %(seq 1 | #{FZF} --preview 'echo -e "\\x1b[33m1234567890 \\x1b[mhello"; echo -e "\\x1b[33m1234567890 \\x1b[mhello"' --preview-window 2,wrap-word), :Enter
tmux.until do |lines| tmux.until do |lines|
assert_equal 1, lines.match_count assert_equal 1, lines.match_count
assert_equal 2, lines.count { |line| line.include?('│ 12 │') } assert_equal(2, lines.count { |line| line.include?('│ 12 │') })
assert_equal 0, lines.count { |line| line.include?('│ h') } assert_equal(0, lines.count { |line| line.include?('│ h') })
end end
end end
@@ -605,8 +605,8 @@ class TestPreview < TestInteractive
tmux.send_keys %(seq 1 | #{FZF} --preview 'echo -e "\\x1b[33m1234567890 \\x1b[mhello"; echo -e "\\x1b[33m1234567890 \\x1b[mhello"' --preview-window 1,wrap-word), :Enter tmux.send_keys %(seq 1 | #{FZF} --preview 'echo -e "\\x1b[33m1234567890 \\x1b[mhello"; echo -e "\\x1b[33m1234567890 \\x1b[mhello"' --preview-window 1,wrap-word), :Enter
tmux.until do |lines| tmux.until do |lines|
assert_equal 1, lines.match_count assert_equal 1, lines.match_count
assert_equal 2, lines.count { |line| line.include?('│ 1 │') } assert_equal(2, lines.count { |line| line.include?('│ 1 │') })
assert_equal 0, lines.count { |line| line.include?('│ h') } assert_equal(0, lines.count { |line| line.include?('│ h') })
end end
end end
end end