Beispiel #1
0
    def test_matcher_with_special_copyright_character(self):
        header = (
            ""
            "//\n"
            "//  MyFile.m\n"
            "//  MyCompany\n"
            "//\n"
            "//  Created by John Appleseed on 12/18/15.\n"
            "//  Copyright © 2015 MyCompany. All rights reserved.\n"
            "//\n"
        )

        assert Matcher(header).match()
Beispiel #2
0
    def test_matcher_with_2_digits_dates(self):
        header = (
            ""
            "//\n"
            "//  MyFile.swift\n"
            "//  MyCompany\n"
            "//\n"
            "//  Created by John Appleseed on 12/18/15.\n"
            "//  Copyright (c) 2015 MyCompany. All rights reserved.\n"
            "//\n"
        )

        assert Matcher(header).match()
Beispiel #3
0
    def test_matcher_with_objc_implementation_file(self):
        header = (
            ""
            "//\n"
            "//  MyFile.m\n"
            "//  MyCompany\n"
            "//\n"
            "//  Created by John Appleseed on 12/18/15.\n"
            "//  Copyright (c) 2015 MyCompany. All rights reserved.\n"
            "//\n"
        )

        assert Matcher(header).match()
Beispiel #4
0
    def test_matcher_with_trim_new_lines_on(self):
        header = (
            ""
            "\n"
            "\n"
            "//\n"
            "//  MyFile.m\n"
            "//  MyCompany\n"
            "//\n"
            "//  Created by John Appleseed on 12/18/15.\n"
            "//  Copyright © 2015 MyCompany. All rights reserved.\n"
            "//\n"
            "\n"
            "\n"
        )

        assert Matcher(header, trim_new_lines=True).match()