Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWright committed Sep 28, 2022
1 parent 6ded6a3 commit 6285df7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions internal/command/root_select_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,21 @@ spec:
t.Run("NullInput", selectTest(`null`, "yaml", `.`, newline("{}"), nil))
t.Run("EmptyDocument", selectTest(`---`, "yaml", `.`, newline("{}"), nil))
t.Run("BlankInput", selectTest(``, "yaml", `.`, newline("{}"), nil))

// https://github.com/TomWright/dasel/discussions/244
t.Run("DynamicSelectorContainingEqualsInValue", selectTest(`
options:
k3s:
extraArgs:
- arg: --no-deploy=traefik
nodeFilters:
- server:*
- arg: --kube-apiserver-arg=feature-gates=HPAContainerMetrics=true
nodeFilters:
- server:*
`, "yaml", `.options.k3s.extraArgs.(arg=--no-deploy=traefik)`, newline(`arg: --no-deploy=traefik
nodeFilters:
- server:*`), nil))
}

func TestRootCmd_Select_TOML(t *testing.T) {
Expand Down

0 comments on commit 6285df7

Please sign in to comment.