Added comma separated arguments test

This commit is contained in:
frank 2018-03-26 14:34:40 +02:00
parent 2f65f50f5f
commit f8076d98e6

View File

@ -124,12 +124,13 @@ void print_found_result(myhtml_tree_t* html_tree, myhtml_collection_t *collectio
int main(int argc, const char * argv[]) int main(int argc, const char * argv[])
{ {
const char *html = "<div>Another<p id=\"hello world\">Hello World</p><p id=\"world\">World</p></div>"; const char *html = "<div>a<p id=\"c d\">c d</p><p id=\"c\">c</p></div>";
// const char *selector = ":has(p)"; // const char *selector = ":has(p)";
// const char *selector = ":contains(Hello World)"; // const char *selector = ":contains(c d)";
const char *selector = ":contains(World)"; // const char *selector = ":contains(c)";
// const char *selector = "p:contains('Hello World')"; // Bad Selector const char *selector = ":contains(c,d)";
// const char *selector = "p:contains(\"Hello World\")"; // Bad Selector // const char *selector = "p:contains('c d')"; // Bad Selector
// const char *selector = "p:contains(\"c d\")"; // Bad Selector
/* init MyHTML and parse HTML */ /* init MyHTML and parse HTML */
myhtml_tree_t *html_tree = parse_html(html, strlen(html)); myhtml_tree_t *html_tree = parse_html(html, strlen(html));