test: check set_format #12
cargo devel CI / cargo CI (push) Successful in 1m22s Details

This commit is contained in:
Christoph J. Scherr 2024-05-12 20:29:40 +02:00
parent 290b959b7e
commit 9700ae5b35
1 changed files with 11 additions and 0 deletions

View File

@ -188,3 +188,14 @@ fn format_padded_prefix() {
"0sQUFBQUFBQUE=" "0sQUFBQUFBQUE="
); );
} }
#[test]
fn set_format_checker() {
let mut options = FormatOptions::default();
assert_eq!(options.format(), Format::Hex);
options.set_format(Format::Base32);
assert_eq!(options.format(), Format::Base32);
options.set_format(Format::Base64);
assert_eq!(options.format(), Format::Base64);
}