fix: getenv test
This commit is contained in:
@@ -37,10 +37,11 @@ fn format_value(value: &Value) -> String {
|
||||
}
|
||||
|
||||
macro_rules! eval_okay_test {
|
||||
($(#[$attr:meta])* $name:ident) => {
|
||||
($(#[$attr:meta])* $name:ident$(, $pre:expr)?) => {
|
||||
$(#[$attr])*
|
||||
#[test]
|
||||
fn $name() {
|
||||
$(($pre)();)?
|
||||
let test_name = concat!("eval-okay-", stringify!($name))
|
||||
.replace("_", "-")
|
||||
.replace("r#", "");
|
||||
@@ -133,7 +134,11 @@ eval_okay_test!(#[ignore = "not implemented: hashString"] hashstring);
|
||||
eval_okay_test!(getattrpos);
|
||||
eval_okay_test!(getattrpos_functionargs);
|
||||
eval_okay_test!(getattrpos_undefined);
|
||||
eval_okay_test!(getenv);
|
||||
eval_okay_test!(getenv, || {
|
||||
unsafe {
|
||||
std::env::set_var("TEST_VAR", "foo")
|
||||
};
|
||||
});
|
||||
eval_okay_test!(groupBy);
|
||||
eval_okay_test!(r#if);
|
||||
eval_okay_test!(ind_string);
|
||||
|
||||
Reference in New Issue
Block a user