Skip to content

Commit

Permalink
Add title/description matching test
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer01 committed Jul 2, 2024
1 parent 6d80c64 commit c3a94b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from path_util import found_filenames_dict
from rex import prepare_regex_fullmatch
# noinspection PyProtectedMember
from tagger import normalize_wtag
from tagger import normalize_wtag, match_text
from util import normalize_path
from version import APP_NAME, APP_VERSION

Expand Down Expand Up @@ -129,10 +129,14 @@ def test_cmd_wtags(self):
parsed1 = prepare_arglist(['-start', '1', '-pages', '5',
'-*[1`-5]`+`(finger{1`,3}|girl`)s`?`.`*',
'-*`[1`-5`]`+`(finger`{1`,3`}`|`girl`)s`?`.`*``'], True)
c1 = BaseConfig()
c1.read(parsed1, True)
self.assertEqual(r'^\-.*[1-5]+(?:finger{1,3}|girl)s?.*$', prepare_regex_fullmatch(normalize_wtag(c1.extra_tags[0])).pattern)
self.assertEqual(r'^\-.*[1-5]+(?:finger{1,3}|girl)s?.*$', prepare_regex_fullmatch(normalize_wtag(c1.extra_tags[1])).pattern)
parsed2 = prepare_arglist(['-start', '1', '-pages', '5', 'trigger`(s|ed|ing`)*'], True)
c2 = BaseConfig()
c2.read(parsed1, True)
self.assertEqual(r'^\-.*[1-5]+(?:finger{1,3}|girl)s?.*$', prepare_regex_fullmatch(normalize_wtag(c2.extra_tags[0])).pattern)
self.assertEqual(r'^\-.*[1-5]+(?:finger{1,3}|girl)s?.*$', prepare_regex_fullmatch(normalize_wtag(c2.extra_tags[1])).pattern)
c2.read(parsed2, True)
self.assertIsNotNone(match_text(c2.extra_tags[0], 'a triggered bluff'))
print(f'{self._testMethodName} passed')


Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
APP_NAME = 'NM'
APP_VER_MAJOR = '1'
APP_VER_SUB = '8'
APP_REVISION = '409'
APP_REVISION = '410'
APP_VERSION = f'{APP_VER_MAJOR}.{APP_VER_SUB}.{APP_REVISION}'

#
Expand Down

0 comments on commit c3a94b5

Please sign in to comment.