commit 615ae8625244709e422a3a10c849b44848b24d1f
parent fb23d3870a3e213c27c62091a947e4bf91fd389a
Author: marisa <mokou@posteo.de>
Date: Sat, 9 Nov 2019 13:07:51 +0100
Use separate destination names for tests
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/shtola/src/lib.rs b/shtola/src/lib.rs
@@ -124,7 +124,7 @@ fn write_dir(ir: IR, dest: &PathBuf) -> Result<(), std::io::Error> {
fn read_works() {
let mut s = Shtola::new();
s.source("../fixtures/simple");
- s.destination("./");
+ s.destination("../fixtures/dest_read");
let r = s.build().unwrap();
assert_eq!(r.files.len(), 1);
let keys: Vec<&PathBuf> = r.files.keys().collect();
@@ -148,7 +148,7 @@ fn clean_works() {
fn write_works() {
let mut s = Shtola::new();
s.source("../fixtures/simple");
- s.destination("../fixtures/dest");
+ s.destination("../fixtures/dest_write");
s.clean(true);
let mw = Box::new(|ir: IR| {
let mut update_hash: HashMap<PathBuf, ShFile> = HashMap::new();
@@ -162,7 +162,7 @@ fn write_works() {
});
s.register(mw);
s.build().unwrap();
- let dpath = PathBuf::from("../fixtures/dest/hello.txt");
+ let dpath = PathBuf::from("../fixtures/dest_write/hello.txt");
assert!(dpath.exists());
let file = &fs::read(dpath).unwrap();
let fstring = String::from_utf8_lossy(file);