From 233e17abd5ec68f2a964954fb42c23705e6fa62d Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 11 Apr 2020 22:58:02 +0100 Subject: spec: update encoding of floating point values to RFC7049bis --- dhall/tests/spec.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'dhall/tests/spec.rs') diff --git a/dhall/tests/spec.rs b/dhall/tests/spec.rs index 37df91d..ee12bc7 100644 --- a/dhall/tests/spec.rs +++ b/dhall/tests/spec.rs @@ -51,7 +51,7 @@ impl FileType { match self { FileType::Text => TestFile::Source(file), FileType::Binary => TestFile::Binary(file), - FileType::Hash => TestFile::Binary(file), + FileType::Hash => TestFile::UI(file), FileType::UI => TestFile::UI(file), } } @@ -449,10 +449,6 @@ fn define_features() -> Vec { false // Pretty sure the test is incorrect || path == "unit/import/urls/quotedPathFakeUrlEncode" - // See https://github.com/pyfisch/cbor/issues/109 - || path == "double" - || path == "unit/DoubleLitExponentNoDot" - || path == "unit/DoubleLitSecretelyInt" }), output_type: FileType::Binary, ..default_feature.clone() @@ -518,13 +514,8 @@ fn define_features() -> Vec { directory: "semantic-hash/success/", variant: SpecTestKind::SemanticHash, exclude_path: Rc::new(|path: &str| { - false - // We don't support bignums - || path == "simple/integerToDouble" - // See https://github.com/pyfisch/cbor/issues/109 - || path == "prelude/Integer/toDouble/0" - || path == "prelude/Integer/toDouble/1" - || path == "prelude/Natural/toDouble/0" + // We don't support bignums + path == "simple/integerToDouble" }), output_type: FileType::Hash, ..default_feature.clone() -- cgit v1.2.3 From 75929b8a3ca99ead6e10365439c40d2fe86dfe55 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Jun 2020 14:27:53 +0100 Subject: chore: garbage collect removed tests --- dhall/tests/spec.rs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'dhall/tests/spec.rs') diff --git a/dhall/tests/spec.rs b/dhall/tests/spec.rs index ee12bc7..d9e2c56 100644 --- a/dhall/tests/spec.rs +++ b/dhall/tests/spec.rs @@ -413,11 +413,6 @@ fn define_features() -> Vec { directory: "parser/success/", variant: SpecTestKind::ParserSuccess, too_slow_path: Rc::new(|path: &str| path == "largeExpression"), - exclude_path: Rc::new(|path: &str| { - false - // Pretty sure the test is incorrect - || path == "unit/import/urls/quotedPathFakeUrlEncode" - }), output_type: FileType::Binary, ..default_feature.clone() }, @@ -445,11 +440,6 @@ fn define_features() -> Vec { directory: "parser/success/", variant: SpecTestKind::BinaryEncoding, too_slow_path: Rc::new(|path: &str| path == "largeExpression"), - exclude_path: Rc::new(|path: &str| { - false - // Pretty sure the test is incorrect - || path == "unit/import/urls/quotedPathFakeUrlEncode" - }), output_type: FileType::Binary, ..default_feature.clone() }, -- cgit v1.2.3 From 5dda920cc988bbd332353eea5f310f2798d4ff8c Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Jun 2020 15:23:02 +0100 Subject: fix: ignore a test on Windows --- dhall/tests/spec.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'dhall/tests/spec.rs') diff --git a/dhall/tests/spec.rs b/dhall/tests/spec.rs index d9e2c56..d7f1564 100644 --- a/dhall/tests/spec.rs +++ b/dhall/tests/spec.rs @@ -479,6 +479,7 @@ fn define_features() -> Vec { || path == "noHeaderForwarding" // TODO: git changes newlines on windows || (cfg!(windows) && path == "unit/AsText") + || (cfg!(windows) && path == "unit/QuotedPath") // TODO: paths on windows have backslashes; this breaks all the `as Location` tests // See https://github.com/dhall-lang/dhall-lang/issues/1032 || (cfg!(windows) && path.contains("asLocation")) -- cgit v1.2.3 From 8719a9332eaab35ef671b954def018bc5dcddcf9 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Jun 2020 16:29:46 +0100 Subject: fix: exclude prelude test for now It's broken because cached imports get alpha-normalized. Those tests should be run with a dummy cache. --- dhall/tests/spec.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dhall/tests/spec.rs') diff --git a/dhall/tests/spec.rs b/dhall/tests/spec.rs index d7f1564..79747a4 100644 --- a/dhall/tests/spec.rs +++ b/dhall/tests/spec.rs @@ -541,7 +541,9 @@ fn define_features() -> Vec { module_name: "type_inference_success", directory: "type-inference/success/", variant: SpecTestKind::TypeInferenceSuccess, - too_slow_path: Rc::new(|path: &str| path == "prelude"), + // TODO: this fails because of caching shenanigans + // too_slow_path: Rc::new(|path: &str| path == "prelude"), + exclude_path: Rc::new(|path: &str| path == "prelude"), ..default_feature.clone() }, TestFeature { -- cgit v1.2.3 From b9c7bf6744fcbf30b988a50fd0b8c28e23f22d29 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 25 Jun 2020 16:31:48 +0100 Subject: fix: always set XDG_CACHE_HOME in tests. We do NOT want to write in real directories during tests, but it's even worse if it's the user's directory. We really need a non-stupid cache abstraction. --- dhall/tests/spec.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'dhall/tests/spec.rs') diff --git a/dhall/tests/spec.rs b/dhall/tests/spec.rs index 79747a4..77d2aaa 100644 --- a/dhall/tests/spec.rs +++ b/dhall/tests/spec.rs @@ -598,6 +598,17 @@ fn run_test(test: &SpecTest) -> Result<()> { // Set environment variable for import tests. env::set_var("DHALL_TEST_VAR", "6 * 7"); + // Configure cache for import tests + env::set_var( + "XDG_CACHE_HOME", + root_dir + .join("dhall-lang") + .join("tests") + .join("import") + .join("cache") + .as_path(), + ); + let SpecTest { input: expr, output: expected, @@ -646,16 +657,6 @@ fn run_test(test: &SpecTest) -> Result<()> { expected.compare_ui(parsed)?; } ImportSuccess => { - // Configure cache for import tests - env::set_var( - "XDG_CACHE_HOME", - root_dir - .join("dhall-lang") - .join("tests") - .join("import") - .join("cache") - .as_path(), - ); let expr = expr.normalize()?; expected.compare(expr)?; } -- cgit v1.2.3