From d33bf62f2466bafefbd3994d899d60271e8e25a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Tue, 20 Aug 2024 17:02:08 -0700 Subject: [PATCH] docs: add notes to two SPDX tests 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 https://github.com/axodotdev/cargo-dist/pull/1345#discussion_r1723932405. --- cargo-dist/src/backend/installer/homebrew.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cargo-dist/src/backend/installer/homebrew.rs b/cargo-dist/src/backend/installer/homebrew.rs index 044e199ef..a86401c0a 100644 --- a/cargo-dist/src/backend/installer/homebrew.rs +++ b/cargo-dist/src/backend/installer/homebrew.rs @@ -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"] }]"#, ); } @@ -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"]"#, ); }