From 17457f0e533c7b68d4f2b113ab1a31a0eb23c8b0 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Fri, 14 Dec 2018 14:04:48 +0100 Subject: monwork - add more tests to the fields function --- cmd/monwork/shell_fields_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd/monwork') 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 { -- cgit v1.2.3-70-g09d2