aboutsummaryrefslogtreecommitdiff
path: root/cmd/monwork/shell_fields_test.go
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2018-12-14 14:04:48 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2018-12-14 14:04:48 +0100
commit17457f0e533c7b68d4f2b113ab1a31a0eb23c8b0 (patch)
tree71fc56ee441b8112d413924b7a68ce4257aebb23 /cmd/monwork/shell_fields_test.go
parent10fb89a017edb4fe35d87d22f1ff96d79e78c185 (diff)
monwork - add more tests to the fields function
Diffstat (limited to 'cmd/monwork/shell_fields_test.go')
-rw-r--r--cmd/monwork/shell_fields_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/monwork/shell_fields_test.go b/cmd/monwork/shell_fields_test.go
index 4ee55cc..80b6e30 100644
--- a/cmd/monwork/shell_fields_test.go
+++ b/cmd/monwork/shell_fields_test.go
@@ -17,7 +17,10 @@ func TestStringToShellFields(t *testing.T) {
S{`foo "bar"`, []string{"foo", `bar`}},
S{`foo "bar baz"`, []string{"foo", `bar baz`}},
S{`foo "bar" "baz"`, []string{"foo", `bar`, `baz`}},
- S{`foo "bar" "baz"`, []string{"foo", `bar`, `baz`}},
+ S{`foo "bar" baz`, []string{"foo", `bar`, `baz`}},
+ S{`foo "bar 'hello" baz`, []string{"foo", `bar 'hello`, `baz`}},
+ S{`foo "bar hello'" baz`, []string{"foo", `bar hello'`, `baz`}},
+ S{`foo "bar 'hello'" baz`, []string{"foo", `bar 'hello'`, `baz`}},
} {
result := stringToShellFields([]byte(e.source))
if err := compare(e.target, result); err != nil {