mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-06-03 16:00:49 +00:00
More test fixes for tcell on GitHub Actions
This commit is contained in:
parent
413c66beba
commit
2a1e5a9729
5
.github/workflows/linux.yml
vendored
5
.github/workflows/linux.yml
vendored
|
@ -11,6 +11,9 @@ on:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
LANG: C.UTF-8
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -42,7 +45,7 @@ jobs:
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
- name: Integration test
|
- name: Integration test
|
||||||
run: make install && ./install --all && LC_ALL=C tmux new-session -d && ruby test/test_go.rb --verbose
|
run: make install && ./install --all && tmux new-session -d && ruby test/test_go.rb --verbose
|
||||||
|
|
||||||
- name: Integration test (tcell)
|
- name: Integration test (tcell)
|
||||||
run: TAGS=tcell make clean install && ruby test/test_go.rb --verbose
|
run: TAGS=tcell make clean install && ruby test/test_go.rb --verbose
|
||||||
|
|
|
@ -3,10 +3,11 @@ CHANGELOG
|
||||||
|
|
||||||
0.46.1
|
0.46.1
|
||||||
------
|
------
|
||||||
|
- Bug fixes and improvements
|
||||||
- Fixed Windows binaries
|
- Fixed Windows binaries
|
||||||
- Downgraded Go version to 1.20 to support older versions of Windows
|
- Downgraded Go version to 1.20 to support older versions of Windows
|
||||||
- https://tip.golang.org/doc/go1.21#windows
|
- https://tip.golang.org/doc/go1.21#windows
|
||||||
- Updated [rivo/uniseg](https://github.com/rivo/uniseg) dependency to v0.4.5
|
- Updated [rivo/uniseg](https://github.com/rivo/uniseg) dependency to v0.4.6
|
||||||
|
|
||||||
0.46.0
|
0.46.0
|
||||||
------
|
------
|
||||||
|
|
|
@ -967,6 +967,7 @@ class TestGoFZF < TestBase
|
||||||
opts = %[--bind "alt-a:execute(echo /{}/ >> #{output})+change-header(alt-a),alt-b:execute[echo /{}{}/ >> #{output}]+change-header(alt-b),C:execute(echo /{}{}{}/ >> #{output})+change-header(C)"]
|
opts = %[--bind "alt-a:execute(echo /{}/ >> #{output})+change-header(alt-a),alt-b:execute[echo /{}{}/ >> #{output}]+change-header(alt-b),C:execute(echo /{}{}{}/ >> #{output})+change-header(C)"]
|
||||||
writelines(tempname, %w[foo'bar foo"bar foo$bar])
|
writelines(tempname, %w[foo'bar foo"bar foo$bar])
|
||||||
tmux.send_keys "cat #{tempname} | #{fzf(opts)}", :Enter
|
tmux.send_keys "cat #{tempname} | #{fzf(opts)}", :Enter
|
||||||
|
tmux.until { |lines| assert_equal 3, lines.item_count }
|
||||||
|
|
||||||
ready = ->(s) { tmux.until { |lines| assert_includes lines[-3], s } }
|
ready = ->(s) { tmux.until { |lines| assert_includes lines[-3], s } }
|
||||||
tmux.send_keys :Escape, :a
|
tmux.send_keys :Escape, :a
|
||||||
|
@ -2184,14 +2185,15 @@ class TestGoFZF < TestBase
|
||||||
file = Tempfile.new('fzf-follow')
|
file = Tempfile.new('fzf-follow')
|
||||||
file.sync = true
|
file.sync = true
|
||||||
|
|
||||||
tmux.send_keys %(seq 100 | #{FZF} --preview 'tail -f "#{file.path}"' --preview-window follow --bind 'up:preview-up,down:preview-down,space:change-preview-window:follow|nofollow' --preview-window '~3'), :Enter
|
tmux.send_keys %(seq 100 | #{FZF} --preview 'echo start; tail -f "#{file.path}"' --preview-window follow --bind 'up:preview-up,down:preview-down,space:change-preview-window:follow|nofollow' --preview-window '~4'), :Enter
|
||||||
tmux.until { |lines| lines.item_count == 100 }
|
tmux.until { |lines| lines.item_count == 100 }
|
||||||
|
|
||||||
# Write to the temporary file, and check if the preview window is showing
|
# Write to the temporary file, and check if the preview window is showing
|
||||||
# the last line of the file
|
# the last line of the file
|
||||||
|
tmux.until { |lines| assert_includes lines[1], 'start' }
|
||||||
3.times { file.puts _1 } # header lines
|
3.times { file.puts _1 } # header lines
|
||||||
1000.times { file.puts _1 }
|
1000.times { file.puts _1 }
|
||||||
tmux.until { |lines| assert_includes lines[1], '/1003' }
|
tmux.until { |lines| assert_includes lines[1], '/1004' }
|
||||||
tmux.until { |lines| assert_includes lines[-2], '999' }
|
tmux.until { |lines| assert_includes lines[-2], '999' }
|
||||||
|
|
||||||
# Scroll the preview window and fzf should stop following the file content
|
# Scroll the preview window and fzf should stop following the file content
|
||||||
|
@ -2199,7 +2201,7 @@ class TestGoFZF < TestBase
|
||||||
tmux.until { |lines| assert_includes lines[-2], '998' }
|
tmux.until { |lines| assert_includes lines[-2], '998' }
|
||||||
file.puts 'foo', 'bar'
|
file.puts 'foo', 'bar'
|
||||||
tmux.until do |lines|
|
tmux.until do |lines|
|
||||||
assert_includes lines[1], '/1005'
|
assert_includes lines[1], '/1006'
|
||||||
assert_includes lines[-2], '998'
|
assert_includes lines[-2], '998'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2212,7 +2214,7 @@ class TestGoFZF < TestBase
|
||||||
end
|
end
|
||||||
file.puts 'baz'
|
file.puts 'baz'
|
||||||
tmux.until do |lines|
|
tmux.until do |lines|
|
||||||
assert_includes lines[1], '/1006'
|
assert_includes lines[1], '/1007'
|
||||||
assert_includes lines[-2], 'baz'
|
assert_includes lines[-2], 'baz'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2221,7 +2223,7 @@ class TestGoFZF < TestBase
|
||||||
wait { assert_includes lines[-2], 'bar' }
|
wait { assert_includes lines[-2], 'bar' }
|
||||||
file.puts 'aaa'
|
file.puts 'aaa'
|
||||||
tmux.until do |lines|
|
tmux.until do |lines|
|
||||||
assert_includes lines[1], '/1007'
|
assert_includes lines[1], '/1008'
|
||||||
assert_includes lines[-2], 'bar'
|
assert_includes lines[-2], 'bar'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2230,7 +2232,7 @@ class TestGoFZF < TestBase
|
||||||
tmux.until { |lines| assert_includes lines[-2], 'aaa' }
|
tmux.until { |lines| assert_includes lines[-2], 'aaa' }
|
||||||
file.puts 'bbb'
|
file.puts 'bbb'
|
||||||
tmux.until do |lines|
|
tmux.until do |lines|
|
||||||
assert_includes lines[1], '/1008'
|
assert_includes lines[1], '/1009'
|
||||||
assert_includes lines[-2], 'bbb'
|
assert_includes lines[-2], 'bbb'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2238,7 +2240,7 @@ class TestGoFZF < TestBase
|
||||||
tmux.send_keys :Space
|
tmux.send_keys :Space
|
||||||
file.puts 'ccc', 'ddd'
|
file.puts 'ccc', 'ddd'
|
||||||
tmux.until do |lines|
|
tmux.until do |lines|
|
||||||
assert_includes lines[1], '/1010'
|
assert_includes lines[1], '/1011'
|
||||||
assert_includes lines[-2], 'bbb'
|
assert_includes lines[-2], 'bbb'
|
||||||
end
|
end
|
||||||
rescue StandardError
|
rescue StandardError
|
||||||
|
@ -3080,6 +3082,11 @@ class TestGoFZF < TestBase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_delete_with_modifiers
|
def test_delete_with_modifiers
|
||||||
|
if ENV['GITHUB_ACTION']
|
||||||
|
# Expected: "[3]"
|
||||||
|
# Actual: "[]3;5~"
|
||||||
|
skip('CTRL-DELETE is not properly handled in GitHub Actions environment')
|
||||||
|
end
|
||||||
tmux.send_keys "seq 100 | #{FZF} --bind 'ctrl-delete:up+up,shift-delete:down,focus:transform-prompt:echo [{}]'", :Enter
|
tmux.send_keys "seq 100 | #{FZF} --bind 'ctrl-delete:up+up,shift-delete:down,focus:transform-prompt:echo [{}]'", :Enter
|
||||||
tmux.until { |lines| assert_equal 100, lines.item_count }
|
tmux.until { |lines| assert_equal 100, lines.item_count }
|
||||||
tmux.send_keys 'C-Delete'
|
tmux.send_keys 'C-Delete'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user