mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
Add test for non calver rewrite
This commit is contained in:
parent
fa485b2e61
commit
a9e662d245
1 changed files with 7 additions and 0 deletions
|
|
@ -108,6 +108,13 @@ def rfd_from_content(
|
|||
>>> rfd = rfd_from_content(pattern_strs, new_vinfo, content)
|
||||
>>> rfd.new_lines
|
||||
['__version__ = "v201809.0123"']
|
||||
>>>
|
||||
>>> new_vinfo = version.parse_version_info("v1.2.3", "v{semver}")
|
||||
>>> pattern_strs = ['__version__ = "v{semver}"']
|
||||
>>> content = '__version__ = "v1.2.2"'
|
||||
>>> rfd = rfd_from_content(pattern_strs, new_vinfo, content)
|
||||
>>> rfd.new_lines
|
||||
['__version__ = "v1.2.3"']
|
||||
"""
|
||||
line_sep = detect_line_sep(content)
|
||||
old_lines = content.split(line_sep)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue