[GH-614] resolving issues around unreadable dates and unparsed dates

This commit is contained in:
Micah Jerome Ellison 2019-07-20 14:42:21 -07:00
parent e3d36645d9
commit f37f82f782
9 changed files with 88 additions and 3 deletions

View file

@ -0,0 +1,12 @@
default_hour: 9
default_minute: 0
editor: ""
encrypt: false
highlight: true
journals:
default: features/journals/brackets.journal
linewrap: 80
tagsymbols: "@"
template: false
timeformat: "%Y-%m-%d %H:%M"
indent_character: "|"

View file

@ -0,0 +1,12 @@
default_hour: 9
default_minute: 0
editor: ""
encrypt: false
highlight: true
journals:
default: features/journals/mostlyreadabledates.journal
linewrap: 80
tagsymbols: "@"
template: false
timeformat: "%Y-%m-%d %H:%M"
indent_character: "|"

View file

@ -0,0 +1,12 @@
default_hour: 9
default_minute: 0
editor: ""
encrypt: false
highlight: true
journals:
default: features/journals/unreadabledates.journal
linewrap: 80
tagsymbols: "@"
template: false
timeformat: "%Y-%m-%d %H:%M"
indent_character: "|"

View file

@ -0,0 +1,2 @@
[2019-07-08 05:42] Entry subject
[1] line starting with 1

View file

@ -0,0 +1,8 @@
[2019-07-18 14:23] Entry subject
Time machines are possible. I know, because I've built one in my garage.
[2019-07-19 14:23] Entry subject
I'm going to activate the machine. Nobody knows what comes next after this. Or before this?
[2019-07 14:23] Entry subject
I've crossed so many timelines. Is there any going back?

View file

@ -0,0 +1,5 @@
[ashasd7zdskhz7asdkjasd] Entry subject
I've lost track of time.
[sadfhakjsdf88sdf7sdff] Entry subject
Time has no meaning.

View file

@ -53,3 +53,22 @@ Feature: Zapped bugs should stay dead.
2013-06-10 15:40 He said "[this] is the best time to be alive".
"""
Scenario: Integers in square brackets should not be read as dates
Given we use the config "brackets.yaml"
When we run "jrnl -1"
Then the output should contain "[1] line starting with 1"
Scenario: Journals with unreadable dates should still be viewable
Given we use the config "unreadabledates.yaml"
When we run "jrnl -2"
Then the output should contain "I've lost track of time."
Then the output should contain "Time has no meaning."
Scenario: Journals with readable dates AND unreadable dates should still contain all data.
Given we use the config "mostlyreadabledates.yaml"
When we run "jrnl -3"
Then the output should contain "Time machines are possible."
When we run "jrnl -1"
Then the output should contain "I'm going to activate the machine."
Then the output should contain "I've crossed so many timelines. Is there any going back?"