some test edit
parent
2076ebd6f4
commit
5bfd9e52c3
|
|
@ -647,5 +647,21 @@ mod edit {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_persist_edits_with_files() {
|
||||||
|
tests::with_dir(|d1| {
|
||||||
|
tests::write_file(&d1, "file", "- foo");
|
||||||
|
let p = d1.path().join("file").display().to_string();
|
||||||
|
let files = Files::new(&vec![p]);
|
||||||
|
tests::with_dir(|d2| {
|
||||||
|
build_dir(&d2, &files).expect("failed to build dir");
|
||||||
|
tests::file_contains(&d2, "file", "- foo");
|
||||||
|
tests::write_file(&d2, "file", "- foobar\n- bar");
|
||||||
|
|
||||||
|
persist_edits(&d2, &files).expect("failed to persist edits");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue