mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
zig fmt
This commit is contained in:
@@ -157,34 +157,20 @@ fn writeEscapedAttributeValue(writer: anytype, value: []const u8) !void {
|
||||
|
||||
const testing = std.testing;
|
||||
test "dump.writeHTML" {
|
||||
try testWriteHTML(
|
||||
"<div id=\"content\">Over 9000!</div>",
|
||||
"<div id=\"content\">Over 9000!</div>"
|
||||
);
|
||||
try testWriteHTML("<div id=\"content\">Over 9000!</div>", "<div id=\"content\">Over 9000!</div>");
|
||||
|
||||
try testWriteHTML(
|
||||
"<root><!-- a comment --></root>",
|
||||
"<root><!-- a comment --></root>"
|
||||
);
|
||||
try testWriteHTML("<root><!-- a comment --></root>", "<root><!-- a comment --></root>");
|
||||
|
||||
try testWriteHTML(
|
||||
"<p>< > &</p>",
|
||||
"<p>< > &</p>"
|
||||
);
|
||||
try testWriteHTML("<p>< > &</p>", "<p>< > &</p>");
|
||||
|
||||
try testWriteHTML(
|
||||
"<p id=\""><&"''\">wat?</p>",
|
||||
"<p id='\"><&"'''>wat?</p>"
|
||||
);
|
||||
try testWriteHTML("<p id=\""><&"''\">wat?</p>", "<p id='\"><&"'''>wat?</p>");
|
||||
|
||||
try testWriteFullHTML(
|
||||
\\<!DOCTYPE html>
|
||||
\\<html><head><title>It's over what?</title><meta name="a" value="b">
|
||||
\\</head><body>9000</body></html>
|
||||
\\
|
||||
,
|
||||
"<html><title>It's over what?</title><meta name=a value=\"b\">\n<body>9000"
|
||||
);
|
||||
, "<html><title>It's over what?</title><meta name=a value=\"b\">\n<body>9000");
|
||||
}
|
||||
|
||||
fn testWriteHTML(comptime expected: []const u8, src: []const u8) !void {
|
||||
|
||||
@@ -185,8 +185,7 @@ test "generate.Union" {
|
||||
}
|
||||
|
||||
test "generate.Tuple" {
|
||||
const Astruct = struct {
|
||||
};
|
||||
const Astruct = struct {};
|
||||
|
||||
const Bstruct = struct {
|
||||
value: u8 = 0,
|
||||
|
||||
Reference in New Issue
Block a user