mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Demonstrate that Quote produces invalid Windows quoting
On Windows, Quote wraps arguments in bash-style `\"…\"` and rewrites embedded double quotes as `"'"'"`. Neither convention is understood by cmd.exe or CommandLineToArgvW, so commands built from quoted arguments are mis-parsed once they contain quotes or spaces (#5560). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f103cf26dd
commit
41efc9a37a
|
|
@ -75,6 +75,9 @@ func TestOSCommandQuoteWindows(t *testing.T) {
|
|||
|
||||
actual := osCommand.Quote(`hello "test" 'test2'`)
|
||||
|
||||
/* EXPECTED:
|
||||
expected := `"hello \"test\" 'test2'"`
|
||||
ACTUAL: */
|
||||
expected := `\"hello "'"'"test"'"'" 'test2'\"`
|
||||
|
||||
assert.EqualValues(t, expected, actual)
|
||||
|
|
|
|||
Loading…
Reference in a new issue