Put the test behind the catch_unwind feature

And fix an unused variable warning
This commit is contained in:
Jonas Schievink 2016-06-26 18:24:47 +02:00
parent d176ea1c6e
commit 351bc569a4
1 changed files with 2 additions and 1 deletions

View File

@ -305,10 +305,11 @@ mod test {
} }
#[test] #[test]
#[cfg(feature = "catch_unwind")]
pub fn test_password() { pub fn test_password() {
let mut password_queried = false; let mut password_queried = false;
let mut buffer = File::open("test/rsa-encrypted.pem").unwrap(); let mut buffer = File::open("test/rsa-encrypted.pem").unwrap();
let rsa = RSA::private_key_from_pem_cb(&mut buffer, |password| { RSA::private_key_from_pem_cb(&mut buffer, |password| {
password_queried = true; password_queried = true;
password[0] = b'm' as _; password[0] = b'm' as _;
password[1] = b'y' as _; password[1] = b'y' as _;