annotate libpam-sys/libpam-sys-test/tests/runner.rs @ 137:88627c057709 default tip

Add Sun PAM functions from Illumos headers.
author Paul Fisher <paul@pfish.zone>
date Thu, 03 Jul 2025 17:33:13 -0400
parents efbc235f01d3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
131
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
1 #![allow(unused_imports)]
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
2
137
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
3 macro_rules! include_test {
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
4 ($file:literal) => {
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
5 include!(concat!(env!("OUT_DIR"), "/", $file));
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
6 };
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
7 }
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
8
131
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
9 mod constants {
137
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
10 #[allow(dead_code, non_camel_case_types, non_upper_case_globals)]
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
11 mod generated {
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
12 include_test!("bindgen.rs");
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
13 }
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
14
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
15 include_test!("constant_test.rs");
131
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
16
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
17 #[test]
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
18 fn test_constants() {
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
19 main()
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
20 }
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
21 }
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
22
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
23 #[allow(clippy::all)]
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
24 mod ctest {
133
32b2a545ca3e Add functions and constants from openpam.h.
Paul Fisher <paul@pfish.zone>
parents: 131
diff changeset
25 use libc::*;
131
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
26 use libpam_sys::*;
137
88627c057709 Add Sun PAM functions from Illumos headers.
Paul Fisher <paul@pfish.zone>
parents: 136
diff changeset
27 include_test!("ctest.rs");
131
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
28
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
29 #[test]
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
30 fn test_c() {
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
31 main();
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
32 }
a632a8874131 Get all the Linux-PAM functions into libpam-sys, and get tests right.
Paul Fisher <paul@pfish.zone>
parents: 127
diff changeset
33 }