From a3e422ff769d4308f74cf7a1276cfc23e99bde97 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Tue, 1 Dec 2020 18:10:10 +1100 Subject: [PATCH] added another test --- pkg/yqlib/path_parse_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/yqlib/path_parse_test.go b/pkg/yqlib/path_parse_test.go index db118a1..dad1ede 100644 --- a/pkg/yqlib/path_parse_test.go +++ b/pkg/yqlib/path_parse_test.go @@ -32,6 +32,11 @@ var pathTests = []struct { append(make([]interface{}, 0), "a", "PIPE", "[]", "SHORT_PIPE", "b", "EQUALS", "apple (string)"), append(make([]interface{}, 0), "a", "[]", "b", "SHORT_PIPE", "apple (string)", "EQUALS", "PIPE"), }, + { + `(.a | .[].b) == "apple"`, + append(make([]interface{}, 0), "(", "a", "PIPE", "[]", "SHORT_PIPE", "b", ")", "EQUALS", "apple (string)"), + append(make([]interface{}, 0), "a", "[]", "b", "SHORT_PIPE", "PIPE", "apple (string)", "EQUALS"), + }, { `.[] | select(. == "*at")`, append(make([]interface{}, 0), "[]", "PIPE", "SELECT", "(", "SELF", "EQUALS", "*at (string)", ")"),