T17: a font saves, and a settings file starts, only when gpui loads it as the terminal draws it, so the terminal never falls back without a word; numbers save on Enter, on leaving the field and on each step; after a refused change a number field drops its draft and the font picker shows the saved family again
This commit is contained in:
9 files changed
+109
-61
No files matched your search
@@ -0,0 +1,17 @@
|
||||
//! gpui builds its Mac platform only on the main thread, so this test brings its own main.
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
fn main() {
|
||||
use elyterminal::term::load_font;
|
||||
let system = gpui::TextSystem::new(gpui_platform::current_platform(true).text_system());
|
||||
assert!(load_font(&gpui::font("Menlo"), &system).is_ok());
|
||||
// A family missing, and one gpui passes over for lacking an `m`.
|
||||
for family in ["No Such Family", "Apple Color Emoji"] {
|
||||
let error = load_font(&gpui::font(family), &system).expect_err(family);
|
||||
assert!(error.to_string().contains(family), "{error}");
|
||||
}
|
||||
println!("fonts: a font gpui does not load is refused");
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
fn main() {}
|
||||
Reference in new issue
Block a user