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

Add parsing-related tests

This commit is contained in:
Steffo 2024-01-03 03:00:50 +01:00
parent ee70746f8c
commit b0efe070ad
Signed by: steffo
GPG key ID: 2A24051445686895
6 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,7 @@
micronfig::config! {
GARASAUTO: String > i64,
}
fn main() {
println!("{:?}", GARASAUTO())
}

View file

@ -0,0 +1,7 @@
micronfig::config! {
MY_IP_ADDR: String > IpAddr,
}
fn main() {
println!("{:?}", MY_IP_ADDR())
}

View file

@ -0,0 +1,7 @@
micronfig::config! {
GARASAUTO: String > std::path::PathBuf,
}
fn main() {
println!("{:?}", GARASAUTO())
}

View file

@ -0,0 +1,9 @@
use std::path::PathBuf;
micronfig::config! {
GARASAUTO: String > PathBuf,
}
fn main() {
println!("{:?}", GARASAUTO())
}

View file

@ -0,0 +1,7 @@
micronfig::config! {
GARASAUTO: String > u64,
}
fn main() {
println!("{:?}", GARASAUTO())
}

View file

@ -22,3 +22,8 @@ pass!(string_single_implicit);
pass!(string_multi_explicit); pass!(string_multi_explicit);
pass!(string_multi_implicit); pass!(string_multi_implicit);
pass!(string_multi_mixed); pass!(string_multi_mixed);
pass!(parse_single_u64);
pass!(parse_single_i64);
pass!(parse_single_ipaddr);
pass!(parse_single_pathbuf_full);
pass!(parse_single_pathbuf_use);