We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44098d9 commit beec2f4Copy full SHA for beec2f4
test/test.rs
@@ -7,6 +7,7 @@ extern crate tempdir;
7
extern crate nix_test as nixtest;
8
9
mod sys;
10
+mod test_net;
11
mod test_nix_path;
12
mod test_stat;
13
mod test_unistd;
test/test_net.rs
@@ -0,0 +1,12 @@
1
+use nix::net::if_::*;
2
+
3
+#[cfg(target_os = "linux")]
4
+const LOOPBACK: &'static [u8] = b"lo";
5
6
+#[cfg(not(target_os = "linux"))]
+const LOOPBACK: &'static [u8] = b"lo0";
+#[test]
+fn test_if_nametoindex() {
+ assert!(if_nametoindex(&LOOPBACK[..]).is_ok());
+}
0 commit comments