summaryrefslogtreecommitdiff
path: root/dhall/build.rs
diff options
context:
space:
mode:
authorNadrieril2019-11-11 09:57:29 +0000
committerNadrieril2019-11-11 10:24:58 +0000
commit36070e6c285ecb96fad56470261c66b082685e56 (patch)
tree6d16bcc4b4761f01590db2c66716c6a44392491a /dhall/build.rs
parent5f29aa9a57192b49d30f7b9066b0b1f48d124e76 (diff)
Generate import tests automatically
Diffstat (limited to 'dhall/build.rs')
-rw-r--r--dhall/build.rs42
1 files changed, 42 insertions, 0 deletions
diff --git a/dhall/build.rs b/dhall/build.rs
index b7ed6ca..c7d339c 100644
--- a/dhall/build.rs
+++ b/dhall/build.rs
@@ -241,6 +241,48 @@ fn main() -> std::io::Result<()> {
make_test_module(
&mut file,
TestFeature {
+ module_name: "import_success",
+ directory: spec_tests_dir.join("import/success/"),
+ variant: "ImportSuccess",
+ path_filter: |path: &str| {
+ false
+ || path == "alternativeEnvNatural"
+ || path == "alternativeEnvSimple"
+ || path == "alternativeHashMismatch"
+ || path == "asLocation"
+ || path == "asText"
+ || path == "customHeaders"
+ || path == "hashFromCache"
+ || path == "headerForwarding"
+ || path == "noHeaderForwarding"
+ },
+ input_type: FileType::Text,
+ output_type: Some(FileType::Text),
+ },
+ )?;
+
+ make_test_module(
+ &mut file,
+ TestFeature {
+ module_name: "import_failure",
+ directory: spec_tests_dir.join("import/failure/"),
+ variant: "ImportFailure",
+ path_filter: |path: &str| {
+ false
+ || path == "alternativeEnv"
+ || path == "alternativeEnvMissing"
+ || path == "hashMismatch"
+ || path == "missing"
+ || path == "referentiallyInsane"
+ },
+ input_type: FileType::Text,
+ output_type: None,
+ },
+ )?;
+
+ make_test_module(
+ &mut file,
+ TestFeature {
module_name: "beta_normalize",
directory: spec_tests_dir.join("normalization/success/"),
variant: "Normalization",