Mercurial > crates > nonstick
view testharness/src/lib.rs @ 110:2346fd501b7a default tip
Add tests for constants and do other macro niceties.
- Adds tests for all the constants. Pretty sweet.
- Moves documentation for cfg-pam-impl macro to `libpam-sys`.
- Renames `Illumos` to `Sun`.
- other stuff
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 29 Jun 2025 02:15:46 -0400 |
parents | a2676475e86b |
children |
line wrap: on
line source
//! The nonstick library extern crate nonstick; use nonstick::{pam_hooks, Flags, PamHandleModule, PamModule}; use std::ffi::CStr; struct TestHarness; impl<M: PamHandleModule> PamModule<M> for TestHarness { fn authenticate(handle: &mut M, args: Vec<&CStr>, flags: Flags) -> nonstick::Result<()> { Ok(()) } fn account_management(handle: &mut M, args: Vec<&CStr>, flags: Flags) -> nonstick::Result<()> { Ok(()) } } pam_hooks!(TestHarness);