Fix wiggle's tests

This commit is contained in:
Jakub Konka
2020-03-11 10:40:23 +01:00
parent ae0a0240ed
commit 7bcbf40f1d
9 changed files with 270 additions and 91 deletions

View File

@@ -1 +0,0 @@
target

View File

@@ -85,7 +85,17 @@ impl Parse for WitxConf {
let path_lits: Punctuated<LitStr, Token![,]> = content.parse_terminated(Parse::parse)?;
let paths: Vec<PathBuf> = path_lits
.iter()
.map(|lit| PathBuf::from(lit.value()))
.map(|lit| {
let p = PathBuf::from(lit.value());
if p.is_absolute() {
p
} else {
let mut root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
root.pop();
root.pop();
root.join(p)
}
})
.collect();
Ok(WitxConf { paths })
}

View File

@@ -1,2 +0,0 @@
target
Cargo.lock

View File

@@ -1,2 +0,0 @@
target
Cargo.lock