summaryrefslogtreecommitdiff
path: root/dhall/src
diff options
context:
space:
mode:
authorNadrieril2020-02-09 17:47:58 +0000
committerNadrieril2020-02-09 19:58:28 +0000
commit8abb6c24cd26b64d708a74faaa28cc9294dc3466 (patch)
tree836c47dbe99ed8884bf685f61315f4ce3bfc2113 /dhall/src
parent81504a7ee24f22820c6bc85823c879d488710d11 (diff)
Move ui outputs to a sensible place
Diffstat (limited to '')
-rw-r--r--dhall/src/tests.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs
index 659317f..d8ce2fa 100644
--- a/dhall/src/tests.rs
+++ b/dhall/src/tests.rs
@@ -201,11 +201,9 @@ fn run_test(test: Test) -> Result<()> {
// we instead write to it the output we got. This makes it easy to update those files: just
// `rm -r dhall/tests/type-errors` and run the tests again.
ImportError(expr, expected) => {
- let base_path = expected.path();
- let error_file_path =
- PathBuf::from("tests/errors/import/").join(base_path);
-
let err: Error = expr.parse()?.resolve().unwrap_err().into();
+
+ let error_file_path = expected.path();
if error_file_path.is_file() {
let expected_msg = std::fs::read_to_string(error_file_path)?;
let msg = format!("{}\n", err);
@@ -227,12 +225,9 @@ fn run_test(test: Test) -> Result<()> {
// we instead write to it the output we got. This makes it easy to update those files: just
// `rm -r dhall/tests/type-errors` and run the tests again.
TypeError(expr, expected) => {
- let base_path = expected.path();
- let error_file_path =
- PathBuf::from("tests/type-errors/").join(base_path);
-
let err: Error = expr.resolve()?.typecheck().unwrap_err().into();
+ let error_file_path = expected.path();
if error_file_path.is_file() {
let expected_msg = std::fs::read_to_string(error_file_path)?;
let msg = format!("{}\n", err);