Skip to content

Commit

Permalink
Added test confirming purl comparison works #777
Browse files Browse the repository at this point in the history
  • Loading branch information
JimFuller-RedHat committed Sep 10, 2024
1 parent c584c01 commit 7c4571c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions common/src/purl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,21 @@ mod tests {
r#""pkg://rpm/redhat/[email protected]_6?arch=s390x""#
))
}

#[test(tokio::test)]
async fn purl_cmp() -> Result<(), anyhow::Error> {
let purl1: Purl = serde_json::from_str(
r#"
"pkg:rpm/redhat/[email protected]?arch=aarch64&tags=test1"
"#,
)
.unwrap();
let purl2: Purl = serde_json::from_str(
r#"
"pkg:rpm/redhat/[email protected]?tags=test1&arch=aarch64"
"#,
)
.unwrap();
Ok(assert_eq!(purl1, purl2))
}
}

0 comments on commit 7c4571c

Please sign in to comment.