implement octal escapes in double quotes

Mentioned in #47.
This commit is contained in:
Gokcehan committed 2017-03-16 00:13:26 +03:00
1 parent 7d21785af7
commit 784d80ca30
2 files changed
+31 -1

No files matched your search

+12
View File
@@ -71,6 +71,18 @@ var gEvalTests = []struct {
[]expr{&callExpr{"echo", []string{"helloworld"}}},
},
{
`echo "hello\0world"`,
[]string{"echo", "hello\000world", "\n"},
[]expr{&callExpr{"echo", []string{"hello\000world"}}},
},
{
`echo "hello\101world"`,
[]string{"echo", "hello\101world", "\n"},
[]expr{&callExpr{"echo", []string{"hello\101world"}}},
},
{
`echo hello\ world`,
[]string{"echo", "hello world", "\n"},