(t *testing.T)
| 120 | } |
| 121 | |
| 122 | func Test_func_string_length(t *testing.T) { |
| 123 | test_xpath_eval(t, empty_example, `string-length("Harp not on that string, madam; that is past.")`, float64(45)) |
| 124 | test_xpath_eval(t, empty_example, `string-length(normalize-space(' abc '))`, float64(3)) |
| 125 | test_xpath_eval(t, html_example, `string-length(//title/text())`, float64(len("My page"))) |
| 126 | test_xpath_eval(t, html_example, `string-length(//html/@lang)`, float64(len("en"))) |
| 127 | test_xpath_count(t, employee_example, `//employee[string-length(@id) > 0]`, 3) // = //employee[@id] |
| 128 | } |
| 129 | |
| 130 | func Test_func_substring(t *testing.T) { |
| 131 | test_xpath_eval(t, empty_example, `substring("motor car", 6)`, " car") |
nothing calls this directly
no test coverage detected
searching dependent graphs…