summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2023-02-27 13:49:08 +0100
committerMatthias Beyer <mail@beyermatthias.de>2023-02-27 13:49:09 +0100
commitb6aa39d66cfdd48da6cf07b914c32fc903f5a475 (patch)
tree50051f426825e2c756eb256e80faa5295c7bdb1b
parent9b6f8cfa76d4b29d4751b46bf628b5fb472b82e7 (diff)
Add repo of unreachable coderepro-424
From issue #424. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--tests/424.rs28
-rw-r--r--tests/424.yaml1
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/424.rs b/tests/424.rs
new file mode 100644
index 0000000..d0d42e7
--- /dev/null
+++ b/tests/424.rs
@@ -0,0 +1,28 @@
+use config::Config;
+use serde::{Deserialize, Serialize};
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+enum EType {
+ E1,
+ E2(u64),
+}
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub struct SType {
+ f1: EType,
+}
+
+impl SType {
+ pub fn new(path: &str) -> Self {
+ let config = Config::builder()
+ .add_source(config::File::with_name(path))
+ .build()
+ .unwrap();
+ config.try_deserialize::<SType>().unwrap()
+ }
+}
+
+#[test]
+fn test_424() {
+ println!("{:?}", SType::new("tests/424.yaml"));
+}
diff --git a/tests/424.yaml b/tests/424.yaml
new file mode 100644
index 0000000..4aff992
--- /dev/null
+++ b/tests/424.yaml
@@ -0,0 +1 @@
+f1: 'E2'