Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/tools/lint/test/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 893 B image not shown  

Quelle  test_file_perm.py   Sprache: Python

 
import mozunit
import pytest

LINTER = "file-perm"


@pytest.mark.lint_config(name="file-perm")
def test_lint_file_perm(lint, paths):
    results = lint(paths("no-shebang"), collapse_results=True)

    assert results.keys() == {
        "no-shebang/bad.c",
        "no-shebang/bad-shebang.c",
        "no-shebang/bad.png",
    }

    for path, issues in results.items():
        for issue in issues:
            assert "permissions on a source" in issue.message
            assert issue.level == "error"


@pytest.mark.lint_config(name="maybe-shebang-file-perm")
def test_lint_shebang_file_perm(config, lint, paths):
    results = lint(paths("maybe-shebang"))

    assert len(results) == 1

    assert "permissions on a source" in results[0].message
    assert results[0].level == "error"
    assert results[0].relpath == "maybe-shebang/bad.js"


if __name__ == "__main__":
    mozunit.main()

Messung V0.5
C=96 H=96 G=95

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.