mirror of
https://github.com/Steffo99/micronfig.git
synced 2024-11-25 17:44:18 +00:00
Try writing some tests
This commit is contained in:
parent
bb1a67d2e9
commit
e2a1726626
5 changed files with 21 additions and 0 deletions
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
7
micronfig_macros/tests/configs/01-three-strings.rs
Normal file
7
micronfig_macros/tests/configs/01-three-strings.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
use micronfig;
|
||||||
|
|
||||||
|
config! {
|
||||||
|
GARAS: String,
|
||||||
|
AUTO: String,
|
||||||
|
BUS: String,
|
||||||
|
}
|
3
micronfig_macros/tests/configs/02-zero-strings.rs
Normal file
3
micronfig_macros/tests/configs/02-zero-strings.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
use micronfig;
|
||||||
|
|
||||||
|
config! {}
|
5
micronfig_macros/tests/trybuild.rs
Normal file
5
micronfig_macros/tests/trybuild.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#[test]
|
||||||
|
fn trybuild() {
|
||||||
|
let t = trybuild::TestCases::new();
|
||||||
|
t.pass("tests/configs/*.rs");
|
||||||
|
}
|
Loading…
Reference in a new issue