| 1 |
|
| 2 |
use assert_cmd::Command; |
| 3 |
|
| 4 |
fn p(filename: &str) -> String { |
| 5 |
format!("../openpgp/tests/data/{}", filename) |
| 6 |
} |
| 7 |
|
| 8 |
/// Asserts that multiple signatures from the same Cert are properly |
| 9 |
/// ignored. |
| 10 |
#[test] |
| 11 |
fn ignore_multiple_signatures() { |
| 12 |
// Multiple signatures from the same Cert are ignored, and fails to |
| 13 |
// meet the threshold. |
| 14 |
Command::cargo_bin("sqv").expect("have sqv") |
| 15 |
.args( |
| 16 |
&["--keyring", |
| 17 |
&p("keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp"), |
| 18 |
"--signatures=2", |
| 19 |
&p("messages/a-cypherpunks-manifesto.txt.ed25519.sig.duplicated"), |
| 20 |
&p("messages/a-cypherpunks-manifesto.txt")]) |
| 21 |
.assert() |
| 22 |
.failure(); |
| 23 |
} |