mirror of
https://github.com/trussed-dev/piv-authenticator.git
synced 2026-06-20 04:16:15 -07:00
17 lines
498 B
Rust
17 lines
498 B
Rust
#![cfg(feature = "dangerous-test-real-card")]
|
|
//! Test the serial number to ensure that tests run on the correct card
|
|
|
|
use expectrl::{spawn, Eof};
|
|
|
|
const CARD: &str = env!("PIV_DANGEROUS_TEST_CARD_READER");
|
|
const SERIAL: &str = env!("PIV_DANGEROUS_TEST_CARD_PIV_SERIAL");
|
|
|
|
#[test]
|
|
fn test_serial_number() {
|
|
let mut p = spawn("piv-tool --serial").unwrap();
|
|
p.expect(format!("Using reader with a card: {CARD}"))
|
|
.unwrap();
|
|
p.expect(SERIAL).unwrap();
|
|
p.expect(Eof).unwrap();
|
|
}
|