lnav/test/test_sql_xml_func.sh

22 lines
738 B
Bash
Raw Normal View History

2020-12-23 23:01:21 +00:00
#! /bin/bash
export YES_COLOR=1
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc[', '<abc/>')"
2020-12-23 23:01:21 +00:00
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc', '<abc')"
2020-12-23 23:01:21 +00:00
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc/def', '<abc/>')"
2020-12-23 23:01:21 +00:00
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc/def[@a=\"b\"]', '<abc><def/><def a=\"b\">ghi</def></abc>')"
2020-12-23 23:01:21 +00:00
run_cap_test ./drive_sql "SELECT * FROM xpath('/abc/def', '<abc><def>Hello &gt;</def></abc>')"
run_cap_test ${lnav_test} -n \
-c ";SELECT * FROM xpath('/catalog', (SELECT content FROM lnav_file LIMIT 1))" \
${test_dir}/invalid-books.xml
run_cap_test ${lnav_test} -n \
-c ";SELECT * FROM xpath('/cat[alog', (SELECT content FROM lnav_file LIMIT 1))" \
${test_dir}/books.xml