From a712b004def95f618489d8e7452e7f1996f0f961 Mon Sep 17 00:00:00 2001 From: Aidan Delaney Date: Sat, 7 Sep 2024 09:02:07 +0100 Subject: [PATCH] Test for conjunction of expressions Demonstrate that `and` is supported as an operator between expressions --- xpath_expression_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/xpath_expression_test.go b/xpath_expression_test.go index f66fc23..2b943d6 100644 --- a/xpath_expression_test.go +++ b/xpath_expression_test.go @@ -69,6 +69,7 @@ func TestAttributes(t *testing.T) { func TestExpressions(t *testing.T) { test_xpath_elements(t, book_example, `//book[@category = "cooking"] | //book[@category = "children"]`, 3, 9) + test_xpath_elements(t, book_example, `//book[@category = "web"] and //book[price = "39.95"]`, 25) test_xpath_count(t, html_example, `//ul/*`, 3) test_xpath_count(t, html_example, `//ul/*/a`, 3) // Sequence