rotz 1.2.1

Fully cross platform dotfile manager written in rust.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use speculoos::{assert_that, prelude::*};

use super::{DotComplex, InstallsComplex};

#[test]
fn parse_dot_complex() {
  let dot_string = r"
  global:
    installs: test
  ";

  let dot = DotComplex::parse(dot_string, crate::FileFormat::Yaml).unwrap();
  assert_that!(dot.selectors.contains_key("global")).is_true();
  assert_that!(dot.selectors.get("global").unwrap().installs)
    .is_some()
    .matches(|i| matches!(i, InstallsComplex::Simple(s) if s == "test"));
}