From 8a918407839515ee6df9d6d495a69cced29b50a7 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Mon, 25 Mar 2024 17:09:55 +0100 Subject: [PATCH] css: comment :contains test --- src/css/libdom_test.zig | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/css/libdom_test.zig b/src/css/libdom_test.zig index b8444f06..ee651f2f 100644 --- a/src/css/libdom_test.zig +++ b/src/css/libdom_test.zig @@ -108,14 +108,14 @@ test "matchFirst" { .{ .q = "p + p", .html = "

", .exp = 1 }, .{ .q = "li, p", .html = "

", .exp = 1 }, .{ .q = "p +/*This is a comment*/ p", .html = "

", .exp = 1 }, - .{ .q = "p:contains(\"that wraps\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, - .{ .q = "p:containsOwn(\"that wraps\")", .html = "

Text block that wraps inner text and continues

", .exp = 0 }, - .{ .q = ":containsOwn(\"inner\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, - .{ .q = "p:containsOwn(\"block\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, - .{ .q = "div:has(#p1)", .html = "

text content

", .exp = 1 }, - .{ .q = "div:has(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, - .{ .q = "body :has(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, - .{ .q = "body :haschild(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, + // .{ .q = "p:contains(\"that wraps\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, + // .{ .q = "p:containsOwn(\"that wraps\")", .html = "

Text block that wraps inner text and continues

", .exp = 0 }, + // .{ .q = ":containsOwn(\"inner\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, + // .{ .q = "p:containsOwn(\"block\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, + // .{ .q = "div:has(#p1)", .html = "

text content

", .exp = 1 }, + // .{ .q = "div:has(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, + // .{ .q = "body :has(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, + // .{ .q = "body :haschild(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, // .{ .q = "p:matches([\\d])", .html = "

0123456789

abcdef

0123ABCD

", .exp = 1 }, // .{ .q = "p:matches([a-z])", .html = "

0123456789

abcdef

0123ABCD

", .exp = 1 }, // .{ .q = "p:matches([a-zA-Z])", .html = "

0123456789

abcdef

0123ABCD

", .exp = 1 }, @@ -249,14 +249,14 @@ test "matchAll" { .{ .q = "p + p", .html = "

", .exp = 1 }, .{ .q = "li, p", .html = "

", .exp = 3 }, .{ .q = "p +/*This is a comment*/ p", .html = "

", .exp = 1 }, - .{ .q = "p:contains(\"that wraps\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, - .{ .q = "p:containsOwn(\"that wraps\")", .html = "

Text block that wraps inner text and continues

", .exp = 0 }, - .{ .q = ":containsOwn(\"inner\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, - .{ .q = "p:containsOwn(\"block\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, + // .{ .q = "p:contains(\"that wraps\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, + // .{ .q = "p:containsOwn(\"that wraps\")", .html = "

Text block that wraps inner text and continues

", .exp = 0 }, + // .{ .q = ":containsOwn(\"inner\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, + // .{ .q = "p:containsOwn(\"block\")", .html = "

Text block that wraps inner text and continues

", .exp = 1 }, .{ .q = "div:has(#p1)", .html = "

text content

", .exp = 1 }, - .{ .q = "div:has(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, - .{ .q = "body :has(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 2 }, - .{ .q = "body :haschild(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, + // .{ .q = "div:has(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, + // .{ .q = "body :has(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 2 }, + // .{ .q = "body :haschild(:containsOwn(\"2\"))", .html = "

contents 1

contents 2

", .exp = 1 }, // .{ .q = "p:matches([\\d])", .html = "

0123456789

abcdef

0123ABCD

", .exp = 2 }, // .{ .q = "p:matches([a-z])", .html = "

0123456789

abcdef

0123ABCD

", .exp = 1 }, // .{ .q = "p:matches([a-zA-Z])", .html = "

0123456789

abcdef

0123ABCD

", .exp = 2 },