def test_make_regexp_something(self):
        regexp = compare_string_to_template.make_regexp('abc')

        self.assertIsNone(regexp.match(''))
        self.assertIsNone(regexp.match('ab'))
        self.assertIsNotNone(regexp.match('abc'))
        self.assertIsNotNone(regexp.match('abcd'))
        self.assertIsNone(regexp.match('bcd'))
    def test_make_regexp_something(self):
        regexp = compare_string_to_template.make_regexp('abc')

        self.assertIsNone(regexp.match(''))
        self.assertIsNone(regexp.match('ab'))
        self.assertIsNotNone(regexp.match('abc'))
        self.assertIsNotNone(regexp.match('abcd'))
        self.assertIsNone(regexp.match('bcd'))
    def test_make_regexp_source_copyright_years(self):
        regexp = compare_string_to_template.make_regexp(
            compare_string_to_template.token_copyright_years)

        self.assertIsNone(regexp.match(''))
        self.assertIsNone(regexp.match('abc'))
        self.assertIsNone(regexp.match('1'))
        self.assertIsNotNone(regexp.match('2011'))
        self.assertIsNotNone(regexp.match('2011-2012'))
    def test_make_regexp_source_file_name(self):
        regexp = compare_string_to_template.make_regexp(
            compare_string_to_template.token_source_file_name)

        self.assertIsNone(regexp.match(''))
        self.assertIsNone(regexp.match('abc'))
        self.assertIsNone(regexp.match('file.'))
        self.assertIsNone(regexp.match('.extension'))
        self.assertIsNotNone(regexp.match('file.extension'))
    def test_make_regexp_source_copyright_years(self):
        regexp = compare_string_to_template.make_regexp(
            compare_string_to_template.token_copyright_years)

        self.assertIsNone(regexp.match(''))
        self.assertIsNone(regexp.match('abc'))
        self.assertIsNone(regexp.match('1'))
        self.assertIsNotNone(regexp.match('2011'))
        self.assertIsNotNone(regexp.match('2011-2012'))
    def test_make_regexp_source_file_name(self):
        regexp = compare_string_to_template.make_regexp(
            compare_string_to_template.token_source_file_name)

        self.assertIsNone(regexp.match(''))
        self.assertIsNone(regexp.match('abc'))
        self.assertIsNone(regexp.match('file.'))
        self.assertIsNone(regexp.match('.extension'))
        self.assertIsNotNone(regexp.match('file.extension'))
    def test_make_regexp_special_characters(self):
        regexp = compare_string_to_template.make_regexp('.*')

        self.assertIsNone(regexp.match(''))
        self.assertIsNone(regexp.match('abc'))
        self.assertIsNotNone(regexp.match('.*'))
    def test_make_regexp_special_characters(self):
        regexp = compare_string_to_template.make_regexp('.*')

        self.assertIsNone(regexp.match(''))
        self.assertIsNone(regexp.match('abc'))
        self.assertIsNotNone(regexp.match('.*'))