aboutsummaryrefslogtreecommitdiff
path: root/statement_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'statement_test.go')
-rw-r--r--statement_test.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/statement_test.go b/statement_test.go
index 88981fa..760788e 100644
--- a/statement_test.go
+++ b/statement_test.go
@@ -145,6 +145,41 @@ func TestParseStatement(t *testing.T) {
args: []string{`a`},
raw: []byte(` echo "a"`),
},
+ }, {
+ raw: []byte(`#put:user:group+0700$noparse src dst`),
+ exp: &Statement{
+ kind: statementKindPut,
+ owner: `user:group`,
+ mode: 0700,
+ args: []string{`src`, `dst`},
+ raw: []byte(`src dst`),
+ optNoparse: true,
+ },
+ }, {
+ raw: []byte(`#put:+0700$noparse src dst`),
+ exp: &Statement{
+ kind: statementKindPut,
+ mode: 0700,
+ args: []string{`src`, `dst`},
+ raw: []byte(`src dst`),
+ optNoparse: true,
+ },
+ }, {
+ raw: []byte(`#put:$noparse src dst`),
+ exp: &Statement{
+ kind: statementKindPut,
+ args: []string{`src`, `dst`},
+ raw: []byte(`src dst`),
+ optNoparse: true,
+ },
+ }, {
+ raw: []byte(`#put:$unknown$noparse src dst`),
+ exp: &Statement{
+ kind: statementKindPut,
+ args: []string{`src`, `dst`},
+ raw: []byte(`src dst`),
+ optNoparse: true,
+ },
}}
var (