Skip to content

Commit

Permalink
Add test to check if minified theme are handled correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 12, 2020
1 parent c8e567d commit 109260f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/librustdoc/theme/tests.rs
Expand Up @@ -102,3 +102,16 @@ fn check_invalid_css() {
let events = load_css_events(b"*");
assert_eq!(events.len(), 0);
}

#[test]
fn test_with_minification() {
let text = include_str!("../html/static/themes/dark.css");
let minified = minifier::css::minify(&text).expect("CSS minification failed");

let against = load_css_paths(text.as_bytes());
let other = load_css_paths(minified.as_bytes());

let mut ret = Vec::new();
get_differences(&against, &other, &mut ret);
assert!(ret.is_empty());
}

0 comments on commit 109260f

Please sign in to comment.