mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Tests for fixing errors automatically
This commit is contained in:
parent
6a81b18544
commit
cabbbea694
2 changed files with 29 additions and 0 deletions
15
features/data/configs/broken.json
Normal file
15
features/data/configs/broken.json
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"default_hour": 9,
|
||||||
|
"timeformat": "%Y-%m-%d %H:%M",
|
||||||
|
"linewrap": 80,
|
||||||
|
"encrypt": false,
|
||||||
|
"editor": "",
|
||||||
|
"default_minute": 0,
|
||||||
|
"highlight": true
|
||||||
|
"password": "",
|
||||||
|
"journals": {
|
||||||
|
"default": "features/journals/simple.journal"
|
||||||
|
"work": "features/journals/work.journal",
|
||||||
|
},
|
||||||
|
"tagsymbols": "@"
|
||||||
|
}
|
14
features/fix_json.feature
Normal file
14
features/fix_json.feature
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
Feature: Fixing broken config files
|
||||||
|
|
||||||
|
Scenario: Loading a file with journal
|
||||||
|
Given we use the config "broken.json"
|
||||||
|
When we run "jrnl -n 2"
|
||||||
|
Then we should see the message "Some errors in your jrnl config have been fixed for you."
|
||||||
|
and the output should be
|
||||||
|
"""
|
||||||
|
2013-06-09 15:39 My first entry.
|
||||||
|
| Everything is alright
|
||||||
|
|
||||||
|
2013-06-10 15:40 Life is good.
|
||||||
|
| But I'm better.
|
||||||
|
"""
|
Loading…
Add table
Reference in a new issue