summaryrefslogtreecommitdiffstats
path: root/features/regression.feature
diff options
context:
space:
mode:
authorMinchinWeb <w_minchin@hotmail.com>2020-04-11 16:14:08 -0600
committerMinchinWeb <w_minchin@hotmail.com>2020-04-18 12:35:46 -0700
commit68ad5c0c1aaef33a126de33c88f260d48c7d18ba (patch)
treeaff94e9d4fe823d20e17f995d64d7ef6fdb04be9 /features/regression.feature
parent62ea1e2b23992281c301d58b5270b987ce799580 (diff)
Ensure exported entries end in a newline for Markdown and YAML exporters (#908)
* [Markdown Exporter] [YAML Exporter] Ensure exported entires end in a newline Fixes #768, Fixes #881. If the exported entry does not have a final empty line, this will add one on export. Some Markdown parsers get picky about not having a empty line above a heading.... * fix black formatting issues * explicitly sort filenames to deal with inconsistent default file ordering on different OS's * Update .gitignore * Update test for typo fix Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
Diffstat (limited to 'features/regression.feature')
-rw-r--r--features/regression.feature37
1 files changed, 37 insertions, 0 deletions
diff --git a/features/regression.feature b/features/regression.feature
index 4dc35b5a..033ec95c 100644
--- a/features/regression.feature
+++ b/features/regression.feature
@@ -123,6 +123,43 @@ Feature: Zapped bugs should stay dead.
Then the output should contain "Adding an entry right now."
Then the output should not contain "A future entry."
+ # See issues #768 and #881
+ # the "deletion" journal is used because it doesn't have a newline at the
+ # end of the last entry
+ Scenario: Add a blank line to Markdown export is there isn't one already
+ Given we use the config "deletion.yaml"
+ When we run "jrnl --export markdown"
+ Then the output should be
+ """
+ # 2019
+
+ ## October
+
+ ### 2019-10-29 11:11 First entry.
+
+
+ ### 2019-10-29 11:11 Second entry.
+
+
+ ### 2019-10-29 11:13 Third entry.
+
+ """
+
+ # See issues #768 and #881
+ Scenario: Add a blank line to YAML export is there isn't one already
+ Given we use the config "deletion.yaml"
+ And we created a directory named "bug768"
+ When we run "jrnl --export yaml -o bug768"
+ Then "bug768" should contain the files ["2019-10-29_first-entry.md", "2019-10-29_second-entry.md", "2019-10-29_third-entry.md"]
+ And the content of exported yaml "bug768/2019-10-29_third-entry.md" should be
+ """
+ title: Third entry.
+ date: 2019-10-29 11:13
+ starred: False
+ tags:
+
+ """
+
@deployment_tests
Scenario: Version numbers should stay in sync
Given we use the config "basic.yaml"