From f8076d98e673077cf27aaf745d29b96214d62fcd Mon Sep 17 00:00:00 2001 From: frank <3737950+f34nk@users.noreply.github.com> Date: Mon, 26 Mar 2018 14:34:40 +0200 Subject: [PATCH] Added comma separated arguments test --- test/myhtml/pseudo_class_contains.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/myhtml/pseudo_class_contains.c b/test/myhtml/pseudo_class_contains.c index ad8bdd0..240142e 100644 --- a/test/myhtml/pseudo_class_contains.c +++ b/test/myhtml/pseudo_class_contains.c @@ -124,12 +124,13 @@ void print_found_result(myhtml_tree_t* html_tree, myhtml_collection_t *collectio int main(int argc, const char * argv[]) { - const char *html = "
Another

Hello World

World

"; + const char *html = "
a

c d

c

"; // const char *selector = ":has(p)"; - // const char *selector = ":contains(Hello World)"; - const char *selector = ":contains(World)"; - // const char *selector = "p:contains('Hello World')"; // Bad Selector - // const char *selector = "p:contains(\"Hello World\")"; // Bad Selector + // const char *selector = ":contains(c d)"; + // const char *selector = ":contains(c)"; + const char *selector = ":contains(c,d)"; + // const char *selector = "p:contains('c d')"; // Bad Selector + // const char *selector = "p:contains(\"c d\")"; // Bad Selector /* init MyHTML and parse HTML */ myhtml_tree_t *html_tree = parse_html(html, strlen(html));