MCPcopy Create free account
hub / github.com/csskit/csskit / test_parse_simple_property

Function test_parse_simple_property

crates/csskit_spec_generator/src/spec_parser.rs:84–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82
83 #[test]
84 fn test_parse_simple_property() {
85 let html = r#"
86 <table class="propdef">
87 <tr><th>Name:</th><td>align-content</td></tr>
88 <tr><th>Value:</th><td>normal | <baseline-position> | <content-distribution></td></tr>
89 <tr><th>Initial:</th><td>normal</td></tr>
90 <tr><th>Applies to:</th><td>block containers</td></tr>
91 <tr><th>Inherited:</th><td>no</td></tr>
92 <tr><th>Percentages:</th><td>n/a</td></tr>
93 <tr><th>Animation type:</th><td>discrete</td></tr>
94 </table>
95 "#;
96
97 let props = parse_spec_properties(html).unwrap();
98 assert_eq!(props.len(), 1);
99 assert_eq!(props[0].name, "align-content");
100 assert_eq!(props[0].initial, "normal");
101 }
102
103 #[test]
104 fn test_skip_property_with_for_field() {

Callers

nothing calls this directly

Calls 1

parse_spec_propertiesFunction · 0.85

Tested by

no test coverage detected