Skip to content

Commit 109260f

Browse files
Add test to check if minified theme are handled correctly
1 parent c8e567d commit 109260f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/librustdoc/theme/tests.rs

+13
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,16 @@ fn check_invalid_css() {
102102
let events = load_css_events(b"*");
103103
assert_eq!(events.len(), 0);
104104
}
105+
106+
#[test]
107+
fn test_with_minification() {
108+
let text = include_str!("../html/static/themes/dark.css");
109+
let minified = minifier::css::minify(&text).expect("CSS minification failed");
110+
111+
let against = load_css_paths(text.as_bytes());
112+
let other = load_css_paths(minified.as_bytes());
113+
114+
let mut ret = Vec::new();
115+
get_differences(&against, &other, &mut ret);
116+
assert!(ret.is_empty());
117+
}

0 commit comments

Comments
 (0)