1
Fork 0
mirror of https://github.com/Steffo99/micronfig.git synced 2024-11-22 16:14:19 +00:00

Try writing some tests

This commit is contained in:
Steffo 2024-01-02 08:34:39 +01:00
parent bb1a67d2e9
commit e2a1726626
Signed by: steffo
GPG key ID: 2A24051445686895
5 changed files with 21 additions and 0 deletions

View file

@ -6,3 +6,5 @@ pub mod envvars;
pub mod envfiles; pub mod envfiles;
#[cfg(feature = "envdot")] #[cfg(feature = "envdot")]
pub mod envdot; pub mod envdot;
pub use micronfig_macros::config;

View file

@ -17,5 +17,9 @@ rustdoc-args = ["--document-private-items"]
syn = "2.0" syn = "2.0"
quote = "1.0" quote = "1.0"
[dev-dependencies]
trybuild = "1.0"
micronfig = { version = "0.3.0", path = "../micronfig" }
[lib] [lib]
proc-macro = true proc-macro = true

View file

@ -0,0 +1,7 @@
use micronfig;
config! {
GARAS: String,
AUTO: String,
BUS: String,
}

View file

@ -0,0 +1,3 @@
use micronfig;
config! {}

View file

@ -0,0 +1,5 @@
#[test]
fn trybuild() {
let t = trybuild::TestCases::new();
t.pass("tests/configs/*.rs");
}