pub fn snippet(source: &Rc<Source>) -> TestStrat {
        let mut heading = HashMap::new();
        let lines = source.contents.lines();

        // build up a list of key-value pairs
        for line in lines {
            if line.len() <= 1 || &line[0..1] != "#" {
                break;
            };

            let spliced = line[1..].trim().split(":").collect::<Vec<&str>>();
            if spliced.len() <= 1 {
                panic!("Missing colon in test strat heading")
            }

            let strat = spliced[0];
            let result = spliced[1..].join(":");
            if heading
                .insert(strat.trim().to_string(), result.trim().to_string())
                .is_some()
            {
                panic!("Key present twice in test strat heading");
            }
        }

        return TestStrat::heading(heading);
    }
Parses the Test Strat from a given snippet.
passerine/tests/fledgling.rs