view libpam-sys/libpam-sys-test/tests/runner.rs @ 134:6c1e1bdb4164

Use standard #[cfg] directives rather than custom proc macros. Instead of having to do a bunch of custom parsing and other logic that tools often choke on, this change introduces an easy way to depend upon custom #[cfg]s provided by the libpam-sys crate.
author Paul Fisher <paul@pfish.zone>
date Thu, 03 Jul 2025 11:03:36 -0400
parents 32b2a545ca3e
children efbc235f01d3
line wrap: on
line source

#![allow(unused_imports)]

mod constants {
    include!(concat!(env!("OUT_DIR"), "/constant_test.rs"));

    #[test]
    fn test_constants() {
        main()
    }
}

#[allow(clippy::all)]
mod ctest {
    use libc::*;
    use libpam_sys::*;
    include!(concat!(env!("OUT_DIR"), "/ctest.rs"));

    #[test]
    fn test_c() {
        eprintln!("Running a test!");
        main();
    }
}