Add a "test" that prints historical bytes, extended capabilities and extended length information.

(This is used for debugging during development, not as an actual test)
This commit is contained in:
Heiko Schaefer 2021-07-29 18:19:50 +02:00
parent d67c01c9f6
commit 396ce9d8c6

View file

@ -214,6 +214,24 @@ fn check_key_upload_algo_attrs() -> Result<()> {
Ok(()) Ok(())
} }
fn test_print_caps(
ca: &mut CardApp,
_param: &[&str],
) -> Result<TestOutput, TestError> {
let ard = ca.get_app_data()?;
let hist = CardApp::get_historical(&ard)?;
println!("hist: {:#?}", hist);
let ecap = CardApp::get_extended_capabilities(&ard)?;
println!("ecap: {:#?}", ecap);
let eli = CardApp::get_extended_length_information(&ard)?;
println!("eli: {:#?}", eli);
Ok(vec![])
}
fn test_upload_keys( fn test_upload_keys(
ca: &mut CardApp, ca: &mut CardApp,
param: &[&str], param: &[&str],
@ -380,6 +398,11 @@ fn main() -> Result<()> {
for mut card in cards { for mut card in cards {
println!("** Run tests on card {:?} **", card); println!("** Run tests on card {:?} **", card);
// println!("Caps");
// let _ = run_test(&mut card, test_print_caps, &[])?;
//
// // continue; // only print caps
println!("Reset"); println!("Reset");
let _ = run_test(&mut card, test_reset, &[])?; let _ = run_test(&mut card, test_reset, &[])?;