From c29518b37ae5b3aef58a25f27f80e3fb377bae16 Mon Sep 17 00:00:00 2001 From: Jonathan van der Steege Date: Tue, 21 Jun 2022 20:43:59 +0200 Subject: [PATCH] Add BDD test --- tests/bdd/features/config_file.feature | 5 +++++ tests/data/configs/linewrap_auto.yaml | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/data/configs/linewrap_auto.yaml diff --git a/tests/bdd/features/config_file.feature b/tests/bdd/features/config_file.feature index 76e93059..5dd59a17 100644 --- a/tests/bdd/features/config_file.feature +++ b/tests/bdd/features/config_file.feature @@ -106,3 +106,8 @@ Feature: Multiple journals And we use the config "basic_onefile.yaml" When we run "jrnl --cf empty_file.yaml" Then the error output should contain "Unable to parse config file" + + Scenario: Use a config file with linewrap set to 'auto' + Given we use the config "linewrap_auto.yaml" + When we run "jrnl -1" + Then the output should contain "Life is good." \ No newline at end of file diff --git a/tests/data/configs/linewrap_auto.yaml b/tests/data/configs/linewrap_auto.yaml new file mode 100644 index 00000000..69188710 --- /dev/null +++ b/tests/data/configs/linewrap_auto.yaml @@ -0,0 +1,17 @@ +default_hour: 9 +default_minute: 0 +editor: "" +encrypt: false +highlight: true +journals: + default: features/journals/simple.journal +linewrap: auto +tagsymbols: "@" +template: false +timeformat: "%Y-%m-%d %H:%M" +indent_character: "|" +colors: + date: none + title: none + body: none + tags: none