Skip to content

Commit

Permalink
Test for conjunction of expressions
Browse files Browse the repository at this point in the history
Demonstrate that `and` is supported as an operator between
expressions
  • Loading branch information
AidanDelaney committed Sep 7, 2024
1 parent 18b075e commit a712b00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xpath_expression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a712b00

Please sign in to comment.