summaryrefslogtreecommitdiff
path: root/src/terminal_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-04-27 18:36:37 +0900
committerGitHub <noreply@github.com>2024-04-27 18:36:37 +0900
commita4391aeedd4fec1865d2d646711f58d04058531b (patch)
tree73a6862010c323f380a3105f929b41a39c7a3753 /src/terminal_test.go
parentb86a967ee217f4c820249701218a17eaad2737ae (diff)
downloadfzf-a4391aeedd4fec1865d2d646711f58d04058531b.tar.gz
Add --with-shell for shelling out with different command and flags (#3746)
Close #3732
Diffstat (limited to 'src/terminal_test.go')
-rw-r--r--src/terminal_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/terminal_test.go b/src/terminal_test.go
index e7d3e751..9fc53919 100644
--- a/src/terminal_test.go
+++ b/src/terminal_test.go
@@ -23,6 +23,7 @@ func replacePlaceholderTest(template string, stripAnsi bool, delimiter Delimiter
allItems: allItems,
lastAction: actBackwardDeleteCharEof,
prompt: "prompt",
+ executor: util.NewExecutor(""),
})
}
@@ -244,6 +245,7 @@ func TestQuoteEntry(t *testing.T) {
unixStyle := quotes{``, `'`, `'\''`, `"`, `\`}
windowsStyle := quotes{`^`, `^"`, `'`, `\^"`, `\\`}
var effectiveStyle quotes
+ exec := util.NewExecutor("")
if util.IsWindows() {
effectiveStyle = windowsStyle
@@ -278,7 +280,7 @@ func TestQuoteEntry(t *testing.T) {
}
for input, expected := range tests {
- escaped := quoteEntry(input)
+ escaped := exec.QuoteEntry(input)
expected = templateToString(expected, effectiveStyle)
if escaped != expected {
t.Errorf("Input: %s, expected: %s, actual %s", input, expected, escaped)