(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestAbsolutePaths(t *testing.T) { |
| 50 | test_xpath_elements(t, book_example, `bookstore`, 2) |
| 51 | test_xpath_elements(t, book_example, `bookstore/book`, 3, 9, 15, 25) |
| 52 | test_xpath_elements(t, book_example, `(bookstore/book)`, 3, 9, 15, 25) |
| 53 | test_xpath_elements(t, book_example, `bookstore/book[2]`, 9) |
| 54 | test_xpath_elements(t, book_example, `bookstore/book[last()]`, 25) |
| 55 | test_xpath_elements(t, book_example, `bookstore/book[last()]/title`, 26) |
| 56 | test_xpath_values(t, book_example, `/bookstore/book[last()]/title/text()`, "Learning XML") |
| 57 | test_xpath_values(t, book_example, `/bookstore/book[@category = "children"]/year`, "2005") |
| 58 | test_xpath_elements(t, book_example, `bookstore/book/..`, 2) |
| 59 | test_xpath_elements(t, book_example, `/bookstore/*`, 3, 9, 15, 25) |
| 60 | test_xpath_elements(t, book_example, `/bookstore/*/title`, 4, 10, 16, 26) |
| 61 | } |
| 62 | |
| 63 | func TestAttributes(t *testing.T) { |
| 64 | test_xpath_tags(t, html_example.FirstChild, "@*", "lang") |
nothing calls this directly
no test coverage detected
searching dependent graphs…