(t *testing.T)
| 241 | } |
| 242 | |
| 243 | func Test_func_normalize_space(t *testing.T) { |
| 244 | const testStr = "\t \rloooooooonnnnnnngggggggg \r \n tes \u00a0 t strin \n\n \r g " |
| 245 | const expectedStr = `loooooooonnnnnnngggggggg tes t strin g` |
| 246 | test_xpath_eval(t, empty_example, `normalize-space("`+testStr+`")`, expectedStr) |
| 247 | test_xpath_eval(t, empty_example, `normalize-space(' abc ')`, "abc") |
| 248 | n := selectNode(employee_example, `//employee[@id="1"]/name`) |
| 249 | test_xpath_eval(t, n, `normalize-space()`, "Opal Kole") |
| 250 | test_xpath_eval(t, n, `normalize-space(.)`, "Opal Kole") |
| 251 | test_xpath_eval(t, book_example, `normalize-space(//book/title)`, "Everyday Italian") |
| 252 | test_xpath_eval(t, book_example, `normalize-space(//book[1]/title)`, "Everyday Italian") |
| 253 | |
| 254 | } |
| 255 | |
| 256 | func Test_func_lower_case(t *testing.T) { |
| 257 | test_xpath_eval(t, empty_example, `lower-case("ABc!D")`, "abc!d") |
nothing calls this directly
no test coverage detected
searching dependent graphs…