lints

`rustc` lints.
git clone https://git.philomathiclife.com/repos/lints
Log | Files | Refs | README

tests.rs (543B)


      1 #[cfg(not(target_os = "openbsd"))]
      2 use core::convert::Infallible;
      3 #[cfg(target_os = "openbsd")]
      4 use std::ffi::OsString;
      5 #[test]
      6 #[cfg(not(target_os = "openbsd"))]
      7 fn priv_sep() {
      8     assert_eq!(super::priv_sep::<Infallible>(), Ok("rustc".into()));
      9 }
     10 #[ignore = "interferes with testing. should run separately to avoid issues."]
     11 #[test]
     12 #[cfg(target_os = "openbsd")]
     13 fn priv_sep() {
     14     assert!(
     15         super::priv_sep().is_ok_and(
     16             |path| path.is_absolute() && path.file_name() == Some(&OsString::from("rustc"))
     17         )
     18     );
     19 }