summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2020-12-07 19:58:24 +0000
committerNadrieril2020-12-08 20:25:20 +0000
commitb4ebbb2b8851e1f792ea6c01b927b83eddee7c5a (patch)
tree0744f25b5c7e30e3225f8ae4790bd0c2fdccb4e8
parent70508b6a6cff9cd1bb6383be939914edf1fc653a (diff)
tests: add a test that fetches the remote prelude
It's too slow even in release mode.
-rw-r--r--serde_dhall/tests/serde.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/serde_dhall/tests/serde.rs b/serde_dhall/tests/serde.rs
index fe0bffb..78382d0 100644
--- a/serde_dhall/tests/serde.rs
+++ b/serde_dhall/tests/serde.rs
@@ -1,6 +1,8 @@
mod serde {
use serde::{Deserialize, Serialize};
- use serde_dhall::{from_str, serialize, FromDhall, StaticType, ToDhall};
+ use serde_dhall::{
+ from_str, serialize, FromDhall, StaticType, ToDhall, Value,
+ };
fn assert_de<T>(s: &str, x: T)
where
@@ -245,6 +247,20 @@ mod serde {
);
}
+ #[test]
+ #[ignore] // Way too slow
+ fn test_prelude() {
+ assert_eq!(
+ serde_dhall::from_str(
+ "https://prelude.dhall-lang.org/package.dhall"
+ )
+ .parse::<Value>()
+ .map(|_| ())
+ .map_err(|e| e.to_string()),
+ Ok(())
+ );
+ }
+
// TODO: test various builder configurations
// In particular test cloning and reusing builder
}