Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove whitespace when serializing operators in attribute selectors #17203

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Update selector test case

  • Loading branch information
achiwhane committed Jun 11, 2017
commit 84cc1052bcf6354b3d7bce8c5db6eba7bebdd104
@@ -2064,9 +2064,10 @@ pub mod tests {
), (1 << 20) + (1 << 10) + (0 << 0))
))));
parser.default_ns = None;

assert!(parse(":not(#provel.old)").is_err());
assert!(parse(":not(#provel > old)").is_err());
assert!(parse("table[rules]:not([rules = \"none\"]):not([rules = \"\"])").is_ok());
assert!(parse("table[rules]:not([rules=\"none\"]):not([rules=\"\"])").is_ok());
assert_eq!(parse(":not(#provel)"), Ok(SelectorList::from_vec(vec!(
Selector::from_vec(vec!(Component::Negation(vec!(
Component::ID(DummyAtom::from("provel")),
@@ -93,13 +93,13 @@ fn test_revalidation_selectors() {
// Attribute selectors.
"div[foo]",
"div:not([foo])",
"div[foo = \"bar\"]",
"div[foo ~= \"bar\"]",
"div[foo |= \"bar\"]",
"div[foo ^= \"bar\"]",
"div[foo $= \"bar\"]",
"div[foo *= \"bar\"]",
"*|div[foo][bar = \"baz\"]",
"div[foo=\"bar\"]",
"div[foo~=\"bar\"]",
"div[foo|=\"bar\"]",
"div[foo^=\"bar\"]",
"div[foo$=\"bar\"]",
"div[foo*=\"bar\"]",
"*|div[foo][bar=\"baz\"]",

// Non-state-based pseudo-classes.
"div:empty",
@@ -138,13 +138,13 @@ fn test_revalidation_selectors() {
// Attribute selectors.
"div[foo]",
"div:not([foo])",
"div[foo = \"bar\"]",
"div[foo ~= \"bar\"]",
"div[foo |= \"bar\"]",
"div[foo ^= \"bar\"]",
"div[foo $= \"bar\"]",
"div[foo *= \"bar\"]",
"*|div[foo][bar = \"baz\"]",
"div[foo=\"bar\"]",
"div[foo~=\"bar\"]",
"div[foo|=\"bar\"]",
"div[foo^=\"bar\"]",
"div[foo$=\"bar\"]",
"div[foo*=\"bar\"]",
"*|div[foo][bar=\"baz\"]",

// Non-state-based pseudo-classes.
"div:empty",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.