()
| 148 | |
| 149 | #[test] |
| 150 | fn test_set_variable_global() { |
| 151 | let result = set_variable("TEST_GLOBAL_VAR", "test_value", true); |
| 152 | match result { |
| 153 | Ok(_) => { |
| 154 | assert_eq!(env::var("TEST_GLOBAL_VAR").unwrap(), "test_value"); |
| 155 | delete_variable("TEST_GLOBAL_VAR".to_string(), true).unwrap(); |
| 156 | } |
| 157 | Err(ErrorKind::CannotSetVariableGlobally(_)) => { |
| 158 | // Test passes if we get permission error on non-admin run |
| 159 | } |
| 160 | Err(e) => panic!("Unexpected error: {:?}", e), |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | #[test] |
| 165 | fn test_delete_variable_global() { |
nothing calls this directly
no test coverage detected