Skip to content
Myr

Dump screen content on test failure

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 207aa07 · Browse files · 1 file+16 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−8 removed

  • tests:+16 added−8 removed

1 file+16 added−8 removed

modified:test/test_go.rb+16 added-8 removed
109 unmodified lines
110 end111112 def until pane = 0113 lines = nil114 begin114 wait do115 lines = capture(pane)116 class << lines117 def item_count118 self[-2] ? self[-2].strip.split('/').last.to_i : 0115 wait do116 lines = capture(pane)117 class << lines118 def item_count119 self[-2] ? self[-2].strip.split('/').last.to_i : 0120 end121 end122 yield lines123 end121 yield lines124 rescue Exception125 puts $!.backtrace126 puts '>' * 80127 puts lines128 puts '<' * 80129 raise130 end131 lines132 end133
400 unmodified lines
534535 def test_ctrl_t536 tmux.prepare537 tmux.send_keys 'C-t', pane: 0530 lines = tmux.until(1) { |lines| lines.item_count > 0 }538 lines = tmux.until(1) { |lines| lines.item_count > 1 }539 expected = lines.values_at(-3, -4).map { |line| line[2..-1] }.join(' ')540 tmux.send_keys :BTab, :BTab, :Enter, pane: 1541 tmux.until(0) { |lines| lines[-1].include? expected }542 tmux.send_keys 'C-c'543544 # FZF_TMUX=0545 new_shell546 tmux.send_keys 'C-t', pane: 0539 lines = tmux.until(0) { |lines| lines.item_count > 0 }547 lines = tmux.until(0) { |lines| lines.item_count > 1 }548 expected = lines.values_at(-3, -4).map { |line| line[2..-1] }.join(' ')549 tmux.send_keys :BTab, :BTab, :Enter, pane: 0550 tmux.until(0) { |lines| lines[-1].include? expected }551 tmux.send_keys 'C-c', 'C-d'
158 unmodified lines