summaryrefslogtreecommitdiffstats
path: root/src/test/ui/env-null-vars.rs
blob: 10582a8a514617d529b74cbf8945f2ecbfc6cf77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// run-pass

#![allow(unused_imports)]

// ignore-windows
// ignore-wasm32-bare no libc to test ffi with

// issue-53200

#![feature(rustc_private)]
extern crate libc;

use std::env;

// FIXME: more platforms?
#[cfg(target_os = "linux")]
fn main() {
    unsafe { libc::clearenv(); }
    assert_eq!(env::vars().count(), 0);
}

#[cfg(not(target_os = "linux"))]
fn main() {}