ferroui-markup 0.3.0

The markup support of FerroUI: binding path parsing and reflection-style bindings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Not from upstream, which has no tests of `ContainerQueryParser`: the
//! parser creates a query for each alternative of the text.

use crate::markup::parsers::ContainerQueryParser;

#[test]
fn parses_a_width_query() {
    let result = ContainerQueryParser::new().parse("min-width:100");

    assert!(matches!(result, Ok(Some(_))), "{:?}", result.is_ok());
}

#[test]
fn parses_an_empty_query_as_none() {
    let result = ContainerQueryParser::new().parse("");

    assert!(matches!(result, Ok(None)), "{:?}", result.is_ok());
}