Skip to content

Commit

Permalink
Merge pull request #244 from knqyf263/additional-params-test-for-EOF-…
Browse files Browse the repository at this point in the history
…command

test: 🧪 Added test
  • Loading branch information
RamiAwar committed Jan 30, 2024
2 parents f1c08dd + f9de45f commit 3061931
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dialog/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ func TestSearchForParams_InvalidParamFormat(t *testing.T) {
}
}

func TestSearchForParams_ConfusingBrackets(t *testing.T) {
command := "cat <<EOF > <file=path/to/file>\nEOF"
want := map[string]string{
"file": "path/to/file",
}
got := SearchForParams([]string{command})
if diff := deep.Equal(want, got); diff != nil {
t.Fatal(diff)
}
}

func TestSearchForParams_MultipleParamsSameKey(t *testing.T) {
command := "<a=1> <a=2> <a=3>"
want := map[string]string{
Expand Down

0 comments on commit 3061931

Please sign in to comment.