summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-03-03 20:55:29 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-03-03 21:19:23 +0900
commitdd49e41c424ad0cbef6ca0a0f52d918053f329ea (patch)
tree6b6f27e5fee02ebe012910580d1d0988721ea16f /test
parent6db15e86937029b4a4565b2ae73a3c6bae5ef4ba (diff)
Ignore xterm OSC control sequences
- OSC Ps ; Pt BEL - OSC Ps ; Pt ST Fix #1415
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index 7c448fe1..fac25dcc 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -1716,6 +1716,18 @@ class TestGoFZF < TestBase
tmux.prepare
end
+ def test_strip_xterm_osc_sequence
+ %W[\x07 \x1b\\].each do |esc|
+ writelines tempname, [%(printf $1"\e]4;3;rgb:aa/bb/cc#{esc} "$2)]
+ File.chmod(0o755, tempname)
+ tmux.prepare
+ tmux.send_keys(
+ %(echo foo bar | #{FZF} --preview '#{tempname} {2} {1}'), :Enter
+ )
+ tmux.until { |lines| lines.any_include?('bar foo') }
+ tmux.send_keys :Enter
+ end
+ end
end
module TestShell