Skip to content

Commit

Permalink
docs: add notes to two SPDX tests
Browse files Browse the repository at this point in the history
These two tests produce different results in Homebrew's SPDX parser,
but that appears to be a bug in Homebrew's parser rather than this one.
Added notes to both tests so that we expect the results to be different
from what Homebrew returns.

refs #1345 (comment).
  • Loading branch information
mistydemeo committed Aug 21, 2024
1 parent a663e04 commit d33bf62
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cargo-dist/src/backend/installer/homebrew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ mod tests {
fn spdx_three_licenses_or_and() {
run_spdx_comparison(
"MIT OR Apache-2.0 AND CC-BY-4.0",
// NOTE: Homebrew parses this as {:all_of=>[{:any_of=>["MIT", "Apache-2.0"]}, "CC-BY-4.0"]}
// According to the spec, this seems to be wrong -
// the result produced here is correct.
r#"any_of: ["MIT", { all_of: ["Apache-2.0", "CC-BY-4.0"] }]"#,
);
}
Expand All @@ -377,6 +380,8 @@ mod tests {
fn spdx_three_licenses_and_or() {
run_spdx_comparison(
"MIT AND Apache-2.0 OR CC-BY-4.0",
// Likewise, Homebrew parses this as {:all_of=>["MIT", {:any_of=>["Apache-2.0", "CC-BY-4.0"]}]}
// Which appears to be incorrect.
r#"any_of: [{ all_of: ["MIT", "Apache-2.0"] }, "CC-BY-4.0"]"#,
);
}
Expand Down

0 comments on commit d33bf62

Please sign in to comment.