add whitespace escaping for backslash
This commit is contained in:
1 parent
87434d3fe6
commit
bfd33f8437
2 files changed
+36
-2
No files matched your search
@@ -41,6 +41,30 @@ var gTests = []struct {
|
||||
[]Expr{&CallExpr{"echo", []string{"hello world"}}},
|
||||
},
|
||||
|
||||
{
|
||||
`echo hello\ world`,
|
||||
[]string{"echo", "hello world", "\n"},
|
||||
[]Expr{&CallExpr{"echo", []string{"hello world"}}},
|
||||
},
|
||||
|
||||
{
|
||||
`echo hello\ world`,
|
||||
[]string{"echo", "hello\tworld", "\n"},
|
||||
[]Expr{&CallExpr{"echo", []string{"hello\tworld"}}},
|
||||
},
|
||||
|
||||
{
|
||||
"echo hello\\\nworld",
|
||||
[]string{"echo", "hello\nworld", "\n"},
|
||||
[]Expr{&CallExpr{"echo", []string{"hello\nworld"}}},
|
||||
},
|
||||
|
||||
{
|
||||
`echo hello\aworld`,
|
||||
[]string{"echo", "helloworld", "\n"},
|
||||
[]Expr{&CallExpr{"echo", []string{"helloworld"}}},
|
||||
},
|
||||
|
||||
{
|
||||
"set hidden # trailing comments are allowed",
|
||||
[]string{"set", "hidden", "\n"},
|
||||
|
||||
Reference in new issue
Block a user