Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Dec 9, 2023
1 parent 464aa90 commit 30879e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,10 @@ outer:
if token != "" {
args = append(args, token)
token = ""
} else {
//TODO. Should we pass in empty strings ?
}
/*else {
//TODO. Should we pass in empty strings ?
}*/
st = STATE_SEARCH_FOR_TOKEN
}
}
Expand Down
10 changes: 10 additions & 0 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3969,6 +3969,16 @@ func TestCommandReadArgsFromStdIn(t *testing.T) {
args: []string{"foo"},
expectError: true,
},
{
name: "incomplete string",
input: `
--ssf
"
hello
`,
args: []string{"foo"},
expectedSlice: []string{"hello"},
},
}

for _, tst := range tests {
Expand Down

0 comments on commit 30879e3

Please sign in to comment.