
#[test]
fn test_path_components() {
    let path = p!("foo/bar/baz");
    let mut components = path.components();
    assert_eq!(components.next().unwrap(), "foo");
    assert_eq!(components.next().unwrap(), "bar");
    assert_eq!(components.next().unwrap(), "baz");
}

#[test]
fn test_path_accumulative_components() {
    let path = p!("foo/bar/baz");
    let mut components = path.cumulative_components();
    assert_eq!(components.next().unwrap(), "foo");