Check for duplicate keys in config file

This commit is contained in:
Jonathan van der Steege 2022-06-14 19:35:18 +02:00
parent 9639c5386f
commit 15dcfcc06d
4 changed files with 95 additions and 0 deletions

View file

@ -103,3 +103,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: Show a warning message when the config file contains double keys at the same level
Given we use the config "double_keys.yaml"
When we run "jrnl -1"
Then the output should contain "One or more keys appear multiple times at the same level"

View file

@ -0,0 +1,27 @@
default_hour: 9
default_minute: 0
editor: ''
encrypt: false
highlight: true
template: false
template: false
journals:
default:
encrypt: false
journal: features/journals/simple.journal
journal: features/journals/simple.journal
ideas:
encrypt: false
journal: features/journals/does-not-exist.journal
simple:
encrypt: false
journal: features/journals/simple.journal
encrypt: false
work:
encrypt: false
journal: features/journals/work.journal
linewrap: 80
tagsymbols: '@'
editor: nano
timeformat: '%Y-%m-%d %H:%M'
indent_character: "|"