comparison testharness/src/lib.rs @ 104:a2676475e86b default tip

Create the very start of a test suite. - Creates a new testharness package - Sets up the outlines of a test suite that will execute there - A basic container where maybe those tests can execute
author Paul Fisher <paul@pfish.zone>
date Wed, 25 Jun 2025 16:56:56 -0400
parents
children
comparison
equal deleted inserted replaced
103:dfcd96a74ac4 104:a2676475e86b
1 //! The nonstick library
2 extern crate nonstick;
3
4 use nonstick::{pam_hooks, Flags, PamHandleModule, PamModule};
5 use std::ffi::CStr;
6
7 struct TestHarness;
8
9 impl<M: PamHandleModule> PamModule<M> for TestHarness {
10 fn authenticate(handle: &mut M, args: Vec<&CStr>, flags: Flags) -> nonstick::Result<()> {
11 Ok(())
12 }
13
14 fn account_management(handle: &mut M, args: Vec<&CStr>, flags: Flags) -> nonstick::Result<()> {
15 Ok(())
16 }
17 }
18
19 pam_hooks!(TestHarness);