From 6285df7e5e28e2d050cfeff4d3b25f9a7c50f5b0 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Wed, 28 Sep 2022 10:51:08 +0100 Subject: [PATCH] Add a test --- internal/command/root_select_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/internal/command/root_select_test.go b/internal/command/root_select_test.go index bb74e656..900fcf98 100644 --- a/internal/command/root_select_test.go +++ b/internal/command/root_select_test.go @@ -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) {