From 0c9b6cf85f5b91dca1913cd50d48cb1acd228c97 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 23 Feb 2021 18:56:10 -0800 Subject: [PATCH] Add unreadable date test Co-authored-by: Jonathan Wren --- tests/data/journals/mostlyreadabledates.journal | 6 +++--- tests/features/datetime.feature | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/data/journals/mostlyreadabledates.journal b/tests/data/journals/mostlyreadabledates.journal index bd211bf5..625ebcf2 100644 --- a/tests/data/journals/mostlyreadabledates.journal +++ b/tests/data/journals/mostlyreadabledates.journal @@ -1,8 +1,8 @@ -[2019-07-18 14:23] Entry subject +[2019-07-18 14:23] The first entry Time machines are possible. I know, because I've built one in my garage. -[2019-07-19 14:23] Entry subject +[2019-07-19 14:23] The second entry I'm going to activate the machine. Nobody knows what comes next after this. Or before this? -[2019-07 14:23] Entry subject +[2019-07 14:23] The third entry I've crossed so many timelines. Is there any going back? diff --git a/tests/features/datetime.feature b/tests/features/datetime.feature index 0bccfd65..c269c188 100644 --- a/tests/features/datetime.feature +++ b/tests/features/datetime.feature @@ -129,3 +129,11 @@ Feature: Reading and writing to journal with custom date formats When we run "jrnl -2" Then the output should contain "I've lost track of time." And 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 --short" + Then the output should be + 2019-07-01 14:23 The third entry + 2019-07-18 14:23 The first entry + 2019-07-19 14:23 The second entry