aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/config/test.rs
blob: e7890922870f1b40b95e83510e031d232b8e2edf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::config::{Config, DEFAULT_ALACRITTY_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.mouse_bindings.is_empty());

    // Sanity check that key bindings are being parsed
    assert!(!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);
}