From a4391aeedd4fec1865d2d646711f58d04058531b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 27 Apr 2024 18:36:37 +0900 Subject: Add --with-shell for shelling out with different command and flags (#3746) Close #3732 --- src/terminal_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/terminal_test.go') 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) -- cgit v1.2.3