Added general environment function (#20)
All checks were successful
Rust Build / Check (push) Successful in 40s
Release Tagging / release (push) Successful in 45s
Rust Build / Test Suite (push) Successful in 34s
Rust Build / Rustfmt (push) Successful in 36s
Rust Build / Clippy (push) Successful in 42s
Rust Build / build (push) Successful in 36s
All checks were successful
Rust Build / Check (push) Successful in 40s
Release Tagging / release (push) Successful in 45s
Rust Build / Test Suite (push) Successful in 34s
Rust Build / Rustfmt (push) Successful in 36s
Rust Build / Clippy (push) Successful in 42s
Rust Build / build (push) Successful in 36s
Reviewed-on: #20 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -59,4 +59,23 @@ mod tests {
|
||||
result
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_env() {
|
||||
let keys = vec![
|
||||
(
|
||||
"RANDOM_ENV_KEY",
|
||||
"YouDon'tWantToButYouGottaChange|It'sGoingToHurtYouTryingToStayTheSame|AreYouInItOrYouInItForTheFame?|I'mTryingToFigureOutWhoLoveMeForMe",
|
||||
),
|
||||
(
|
||||
"MODNAR_ENV_KEY",
|
||||
"FeelingTheMonsterClimbDeepserInsideOfMe|FeelingHimGnawingMyHeartAwayHungrily|I'llNeverLoseThisPain|NeverDreamOfYouAgain",
|
||||
),
|
||||
];
|
||||
|
||||
for (key, value) in keys.iter() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_env(key));
|
||||
assert_eq!(result, *value, "{:?} does not match {:?}", key, result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user