summaryrefslogtreecommitdiff
path: root/serde_dhall/tests
diff options
context:
space:
mode:
authorNadrieril2020-12-07 15:24:36 +0000
committerNadrieril2020-12-07 19:34:39 +0000
commit922199ab322efa7b62bf4698cf5ed9e2d7a378c0 (patch)
treec66ecd3b0bb54fe6a31a83ab796df24c370ed265 /serde_dhall/tests
parentc1fe26d45c831eec015ad5c015236fce1928613a (diff)
Unify `skip_resolve_expr` with normal resolution
Diffstat (limited to 'serde_dhall/tests')
-rw-r--r--serde_dhall/tests/serde.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/serde_dhall/tests/serde.rs b/serde_dhall/tests/serde.rs
index 1181f72..fe0bffb 100644
--- a/serde_dhall/tests/serde.rs
+++ b/serde_dhall/tests/serde.rs
@@ -226,6 +226,25 @@ mod serde {
Ok(true)
);
}
+
+ #[test]
+ fn test_import() {
+ assert_de(
+ "../dhall-lang/tests/parser/success/unit/BoolLitTrueA.dhall",
+ true,
+ );
+ assert_eq!(
+ serde_dhall::from_str(
+ "../dhall-lang/tests/parser/success/unit/BoolLitTrueA.dhall"
+ )
+ .imports(false)
+ .static_type_annotation()
+ .parse::<bool>()
+ .map_err(|e| e.to_string()),
+ Err("UnexpectedImport(Import { mode: Code, location: Local(Parent, FilePath { file_path: [\"dhall-lang\", \"tests\", \"parser\", \"success\", \"unit\", \"BoolLitTrueA.dhall\"] }), hash: None })".to_string())
+ );
+ }
+
// TODO: test various builder configurations
// In particular test cloning and reusing builder
}