mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-19 01:05:37 +03:00
Removed another test that is Windows-specific
We're not trying to test the shlex library; just our wrapper function
This commit is contained in:
parent
794d271152
commit
fec491fb12
1 changed files with 3 additions and 10 deletions
|
@ -118,28 +118,21 @@ func TestSplitCommandAndArgs(t *testing.T) {
|
||||||
expectedArgs: []string{`arg1 arg1`},
|
expectedArgs: []string{`arg1 arg1`},
|
||||||
expectedErrContent: ``,
|
expectedErrContent: ``,
|
||||||
},
|
},
|
||||||
// Test case 5 - command with comments
|
// Test case 5 - command with multiple spaces and tab character
|
||||||
{
|
|
||||||
input: `command arg1 #comment1 comment2`,
|
|
||||||
expectedCommand: `command`,
|
|
||||||
expectedArgs: []string{`arg1`},
|
|
||||||
expectedErrContent: "",
|
|
||||||
},
|
|
||||||
// Test case 6 - command with multiple spaces and tab character
|
|
||||||
{
|
{
|
||||||
input: "command arg1 arg2\targ3",
|
input: "command arg1 arg2\targ3",
|
||||||
expectedCommand: `command`,
|
expectedCommand: `command`,
|
||||||
expectedArgs: []string{`arg1`, `arg2`, "arg3"},
|
expectedArgs: []string{`arg1`, `arg2`, "arg3"},
|
||||||
expectedErrContent: "",
|
expectedErrContent: "",
|
||||||
},
|
},
|
||||||
// Test case 7 - command with unclosed quotes
|
// Test case 6 - command with unclosed quotes
|
||||||
{
|
{
|
||||||
input: `command "arg1 arg2`,
|
input: `command "arg1 arg2`,
|
||||||
expectedCommand: "",
|
expectedCommand: "",
|
||||||
expectedArgs: nil,
|
expectedArgs: nil,
|
||||||
expectedErrContent: parseErrorContent,
|
expectedErrContent: parseErrorContent,
|
||||||
},
|
},
|
||||||
// Test case 8 - command with unclosed quotes
|
// Test case 7 - command with unclosed quotes
|
||||||
{
|
{
|
||||||
input: `command 'arg1 arg2"`,
|
input: `command 'arg1 arg2"`,
|
||||||
expectedCommand: "",
|
expectedCommand: "",
|
||||||
|
|
Loading…
Reference in a new issue