summaryrefslogtreecommitdiffstats
path: root/sqv/tests/multiple-signatures.rs
blob: e423215e203d6be5d7717024dec556ef0fbfaf51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use assert_cli;

use assert_cli::Assert;

fn p(filename: &str) -> String {
    format!("../openpgp/tests/data/{}", filename)
}

/// Asserts that multiple signatures from the same Cert are properly
/// ignored.
#[test]
fn ignore_multiple_signatures() {
    // Multiple signatures from the same Cert are ignored, and fails to
    // meet the threshold.
    Assert::cargo_binary("sqv")
        .with_args(
            &["--keyring",
              &p("keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp"),
              "--signatures=2",
              &p("messages/a-cypherpunks-manifesto.txt.ed25519.sig.duplicated"),
              &p("messages/a-cypherpunks-manifesto.txt")])
        .fails()
        .unwrap();
}