Skip to content
Myr

Pin $SHELL to cmd in TestQuoteEntry and TestReplacePlaceholder

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

authored by Cyrus · committed by Junegunn Choi · parent d46bfd0 · Browse files · 1 file+6 added−0 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+6 added−0 removed

  • other:+6 added−0 removed

1 file+6 added−0 removed

modified:src/terminal_test.go+6 added
27 unmodified lines
28 return replaced29}3031func TestReplacePlaceholder(t *testing.T) {32 // Pin $SHELL so the quoting style doesn't depend on the test runner's shell33 t.Setenv("SHELL", "cmd")3435 item1 := newItem(" foo'bar \x1b[31mbaz\x1b[m")36 items1 := [3][]*Item{{item1}, {item1}, nil}37 items2 := [3][]*Item{38 {newItem("foo'bar \x1b[31mbaz\x1b[m")},
218 unmodified lines
257 type quotes struct{ E, O, SQ, DQ, BS, PB string } // standalone escape, outer, single and double quotes, doubled and plain backslash258 unixStyle := quotes{``, `'`, `'\''`, `"`, `\`, `\`}259 windowsStyle := quotes{`^`, `^"`, `'`, `\^"`, `\\`, `\`}260 var effectiveStyle quotes261262 // Pin $SHELL so the quoting style doesn't depend on the test runner's shell263 t.Setenv("SHELL", "cmd")264 exec := util.NewExecutor("")265266 if util.IsWindows() {267 effectiveStyle = windowsStyle
662 unmodified lines