Skip to content

Commit

Permalink
Add NOASSERTION (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle authored Oct 4, 2021
1 parent e4e4cd0 commit 3b4f753
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/identifiers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,7 @@ pub const LICENSES: &[(&str, &str, u8)] = &[
0x0,
),
("NLPL", r#"No Limit Public License"#, 0x0),
("NOASSERTION", r#"NOASSERTION"#, 0x0),
("NOSL", r#"Netizen Open Source License"#, IS_FSF_LIBRE),
(
"NPL-1.0",
Expand Down
8 changes: 8 additions & 0 deletions tests/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,11 @@ fn gfdl() {
false => |req| exact!(req, "GFDL-1.3-invariants"),
]);
}

#[test]
fn noassertion() {
check!("NOASSERTION AND OpenSSL" => [
true && false => |req| exact!(req, "NOASSERTION") || exact!(req, "MIT"),
true && true => |req| exact!(req, "NOASSERTION") || exact!(req, "OpenSSL"),
]);
}
5 changes: 5 additions & 0 deletions update/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ pub const IS_GNU: u8 = 0x10;
}
}

let name = "NOASSERTION".to_owned();
// Add NOASSERTION, which is not yet? part of the SPDX spec
// https://github.com/spdx/spdx-spec/issues/50
v.push(("NOASSERTION".to_owned(), &name, "0x0".to_owned()));

v.sort_by(|a, b| a.0.cmp(&b.0));

let lic_list_ver = get(&json, "licenseListVersion")?;
Expand Down

0 comments on commit 3b4f753

Please sign in to comment.