From 729eef0c933831bccfeac6a355bdb410787fbe5f Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 5 Oct 2019 02:29:26 +0200 Subject: Update to winit/glutin EventLoop 2.0 This takes the latest glutin master to port Alacritty to the EventLoop 2.0 rework. This changes a big part of the event loop handling by pushing the event loop in a separate thread from the renderer and running both in parallel. Fixes #2796. Fixes #2694. Fixes #2643. Fixes #2625. Fixes #2618. Fixes #2601. Fixes #2564. Fixes #2456. Fixes #2438. Fixes #2334. Fixes #2254. Fixes #2217. Fixes #1789. Fixes #1750. Fixes #1125. --- alacritty/src/config/test.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 alacritty/src/config/test.rs (limited to 'alacritty/src/config/test.rs') diff --git a/alacritty/src/config/test.rs b/alacritty/src/config/test.rs new file mode 100644 index 00000000..8da6cef5 --- /dev/null +++ b/alacritty/src/config/test.rs @@ -0,0 +1,24 @@ +use alacritty_terminal::config::DEFAULT_ALACRITTY_CONFIG; + +use crate::config::Config; + +#[test] +fn parse_config() { + let config: Config = + ::serde_yaml::from_str(DEFAULT_ALACRITTY_CONFIG).expect("deserialize config"); + + // Sanity check that mouse bindings are being parsed + assert!(!config.ui_config.mouse_bindings.is_empty()); + + // Sanity check that key bindings are being parsed + assert!(!config.ui_config.key_bindings.is_empty()); +} + +#[test] +fn default_match_empty() { + let default = Config::default(); + + let empty = serde_yaml::from_str("key: val\n").unwrap(); + + assert_eq!(default, empty); +} -- cgit