Skip to content

Commit

Permalink
test: 🧪 Added test
Browse files Browse the repository at this point in the history
Copied from knqyf263#224
  • Loading branch information
RamiAwar committed Jan 30, 2024
1 parent f1c08dd commit f9de45f
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 f9de45f

Please sign in to comment.