From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- tools/lint/test/test_file_license.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tools/lint/test/test_file_license.py (limited to 'tools/lint/test/test_file_license.py') diff --git a/tools/lint/test/test_file_license.py b/tools/lint/test/test_file_license.py new file mode 100644 index 0000000000..b00b023bae --- /dev/null +++ b/tools/lint/test/test_file_license.py @@ -0,0 +1,23 @@ +import mozunit + +LINTER = "license" + + +def test_lint_license(lint, paths): + results = lint(paths()) + print(results) + assert len(results) == 3 + + assert ".eslintrc.js" in results[0].relpath + + assert "No matching license strings" in results[1].message + assert results[1].level == "error" + assert "bad.c" in results[1].relpath + + assert "No matching license strings" in results[2].message + assert results[2].level == "error" + assert "bad.js" in results[2].relpath + + +if __name__ == "__main__": + mozunit.main() -- cgit v1.2.3