summaryrefslogtreecommitdiff
path: root/dhall/build.rs
diff options
context:
space:
mode:
authorNadrieril2020-02-09 17:47:58 +0000
committerNadrieril2020-02-09 19:58:28 +0000
commit8abb6c24cd26b64d708a74faaa28cc9294dc3466 (patch)
tree836c47dbe99ed8884bf685f61315f4ce3bfc2113 /dhall/build.rs
parent81504a7ee24f22820c6bc85823c879d488710d11 (diff)
Move ui outputs to a sensible place
Diffstat (limited to '')
-rw-r--r--dhall/build.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/dhall/build.rs b/dhall/build.rs
index 3955b3a..67f11e2 100644
--- a/dhall/build.rs
+++ b/dhall/build.rs
@@ -110,14 +110,14 @@ fn make_test_module(
}
Some(output_type @ FileType::UI) => {
let input = feature.input_type.construct(&path);
- let output_file = PathBuf::from(path.as_ref())
- .strip_prefix(base_path)
- .unwrap()
- .strip_prefix(feature.directory)
- .unwrap()
- .to_string_lossy()
- .into_owned();
- let output = output_type.construct(&output_file);
+ // All ui outputs are in the local `tests/` directory.
+ let output_file = PathBuf::from("tests/").join(
+ PathBuf::from(path.as_ref())
+ .strip_prefix(base_path)
+ .unwrap(),
+ );
+ let output =
+ output_type.construct(&output_file.to_str().unwrap());
format!("{}({}, {})", feature.variant, input, output)
}
Some(output_type) => {