diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2018-12-14 14:04:48 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2018-12-14 14:04:48 +0100 |
commit | 17457f0e533c7b68d4f2b113ab1a31a0eb23c8b0 (patch) | |
tree | 71fc56ee441b8112d413924b7a68ce4257aebb23 /cmd/monwork | |
parent | 10fb89a017edb4fe35d87d22f1ff96d79e78c185 (diff) |
monwork - add more tests to the fields function
Diffstat (limited to 'cmd/monwork')
-rw-r--r-- | cmd/monwork/shell_fields_test.go | 5 |
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 { |