about summary refs log tree commit diff
path: root/tests/ui/process/exec-env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/process/exec-env.rs')
-rw-r--r--tests/ui/process/exec-env.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/process/exec-env.rs b/tests/ui/process/exec-env.rs
new file mode 100644
index 00000000000..9054b378f56
--- /dev/null
+++ b/tests/ui/process/exec-env.rs
@@ -0,0 +1,10 @@
+//@ run-pass
+//@ exec-env:TEST_EXEC_ENV=22
+//@ ignore-wasm32 wasm runtimes aren't configured to inherit env vars yet
+//@ ignore-sgx unsupported
+
+use std::env;
+
+pub fn main() {
+    assert_eq!(env::var("TEST_EXEC_ENV"), Ok("22".to_string()));
+}