Kit · K04: compat/kit runs Ely beside the newest GPUI Kit in one window; check.sh holds it to Kit's newest release
This commit is contained in:
1 parent
98de2a455f
commit
99615e1a0c
10 files changed
+352
-6
No files matched your search
@@ -0,0 +1,26 @@
|
||||
use ely_gpui_component::Assets;
|
||||
use gpui_kit::AssetSource;
|
||||
|
||||
#[test]
|
||||
fn one_source_serves_both_libraries() {
|
||||
let kit = gpui_kit::assets::Assets;
|
||||
let both = Assets::before(gpui_kit::assets::Assets);
|
||||
let ely = Assets.list("").unwrap();
|
||||
assert!(ely.len() > 300, "Ely bundles {} files", ely.len());
|
||||
for path in &ely {
|
||||
let served = both.load(path).unwrap().expect("Ely's file loads");
|
||||
assert_eq!(
|
||||
served,
|
||||
Assets.load(path).unwrap().unwrap(),
|
||||
"{path} is Ely's"
|
||||
);
|
||||
}
|
||||
let icons = kit.list("icons/").unwrap();
|
||||
assert!(!icons.is_empty(), "Kit lists its icons");
|
||||
for path in &icons {
|
||||
let served = both.load(path).unwrap().expect("Kit's icon loads");
|
||||
if Assets.load(path).unwrap().is_none() {
|
||||
assert_eq!(served, kit.load(path).unwrap().unwrap(), "{path} is Kit's");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user