Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fzf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
fzf
Commits
68b60c6d
Unverified
Commit
68b60c6d
authored
8 years ago
by
Junegunn Choi
Browse files
Options
Downloads
Patches
Plain Diff
Update test_execute_multi (#590)
parent
3a644b16
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_go.rb
+10
-7
10 additions, 7 deletions
test/test_go.rb
with
10 additions
and
7 deletions
test/test_go.rb
+
10
−
7
View file @
68b60c6d
...
...
@@ -904,21 +904,24 @@ class TestGoFZF < TestBase
def
test_execute_multi
output
=
'/tmp/fzf-test-execute-multi'
opts
=
%[--multi --bind
\\
"alt-a:execute-multi(echo '[{}], @{}@' >>
#{
output
}
; sync)
\\
"]
tmux
.
send_keys
"seq 100 |
#{
fzf
opts
}
"
,
:Enter
tmux
.
until
{
|
lines
|
lines
[
-
2
].
include?
'100/100'
}
opts
=
%[--multi --bind
\\
"alt-a:execute-multi(echo {}/{} >>
#{
output
}
; sync)
\\
"]
writelines
tempname
,
%w[foo'bar foo"bar foo$bar foobar]
tmux
.
send_keys
"cat
#{
tempname
}
|
#{
fzf
opts
}
"
,
:Enter
tmux
.
until
{
|
lines
|
lines
[
-
2
].
include?
'4/4'
}
tmux
.
send_keys
:Escape
,
:a
tmux
.
until
{
|
lines
|
lines
[
-
2
].
include?
'/
100
'
}
tmux
.
until
{
|
lines
|
lines
[
-
2
].
include?
'/
4
'
}
tmux
.
send_keys
:BTab
,
:BTab
,
:BTab
tmux
.
send_keys
:Escape
,
:a
tmux
.
until
{
|
lines
|
lines
[
-
2
].
include?
'/
100
'
}
tmux
.
until
{
|
lines
|
lines
[
-
2
].
include?
'/
4
'
}
tmux
.
send_keys
:Tab
,
:Tab
tmux
.
send_keys
:Escape
,
:a
tmux
.
until
{
|
lines
|
lines
[
-
2
].
include?
'/
100
'
}
tmux
.
until
{
|
lines
|
lines
[
-
2
].
include?
'/
4
'
}
tmux
.
send_keys
:Enter
tmux
.
prepare
readonce
assert_equal
[
'["1"], @"1"@'
,
'["1" "2" "3"], @"1" "2" "3"@'
,
'["1" "2" "4"], @"1" "2" "4"@'
],
assert_equal
[
%[foo'bar/foo'bar]
,
%[foo'bar foo"bar foo$bar/foo'bar foo"bar foo$bar]
,
%[foo'bar foo"bar foobar/foo'bar foo"bar foobar]
],
File
.
readlines
(
output
).
map
(
&
:chomp
)
ensure
File
.
unlink
output
rescue
nil
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment