mirror of
https://github.com/drewcassidy/yaclog.git
synced 2024-09-01 14:58:58 +00:00
Fixed broken header in new changelogs
This commit is contained in:
parent
38560702f4
commit
d35b7fee83
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file
|
All notable changes to this project will be documented in this file
|
||||||
|
|
||||||
|
## 1.0.1 - 2021-05-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed broken header in new changelogs
|
||||||
|
|
||||||
|
|
||||||
## 1.0.0 - 2021-05-07
|
## 1.0.0 - 2021-05-07
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -28,6 +28,12 @@ class TestCreation(unittest.TestCase):
|
|||||||
self.assertTrue(os.path.exists(os.path.abspath(location)), 'yaclog init did not create a file')
|
self.assertTrue(os.path.exists(os.path.abspath(location)), 'yaclog init did not create a file')
|
||||||
self.assertIn(location, result.output, "yaclog init did not echo the file's correct location")
|
self.assertIn(location, result.output, "yaclog init did not echo the file's correct location")
|
||||||
|
|
||||||
|
with open(location, 'r') as fp:
|
||||||
|
self.assertEqual('# Changelog\n', fp.readline())
|
||||||
|
self.assertEqual('\n', fp.readline())
|
||||||
|
self.assertEqual('All notable changes to this project will be documented in this file',
|
||||||
|
fp.readline().rstrip())
|
||||||
|
|
||||||
with open(location, 'w') as fp:
|
with open(location, 'w') as fp:
|
||||||
fp.write(err_str)
|
fp.write(err_str)
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ class Changelog:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, path=None,
|
def __init__(self, path=None,
|
||||||
preamble: str = "Changelog\n\nAll notable changes to this project will be documented in this file"):
|
preamble: str = "# Changelog\n\nAll notable changes to this project will be documented in this file"):
|
||||||
"""
|
"""
|
||||||
Contents will be automatically read from disk if the file exists
|
Contents will be automatically read from disk if the file exists
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user