mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-27 21:16:14 +02:00
Add linewrap option 'auto' (#1507)
* Add linewrap option 'auto' * Specify the exception thrown * Add BDD test * Specify name instead of number * Create test for linewrap auto and fancy format * Fix linewrap auto for fancy format
This commit is contained in:
parent
252c63f4dd
commit
80bfff384e
5 changed files with 66 additions and 7 deletions
|
@ -107,6 +107,16 @@ Feature: Multiple journals
|
|||
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."
|
||||
|
||||
Scenario: Use a config file with linewrap set to 'auto' and use format 'fancy'
|
||||
Given we use the config "linewrap_auto.yaml"
|
||||
When we run "jrnl -1 --format fancy"
|
||||
Then the output should contain "Life is good."
|
||||
|
||||
Scenario: Show a warning message when the config file contains duplicate keys at the same level
|
||||
Given the config "duplicate_keys.yaml" exists
|
||||
And we use the config "duplicate_keys.yaml"
|
||||
|
@ -122,4 +132,4 @@ Feature: Multiple journals
|
|||
Scenario: Don't show a duplicate keys warning message when using --config-override on an existing value
|
||||
Given we use the config "multiple.yaml"
|
||||
When we run "jrnl --config-override highlight false"
|
||||
Then the output should not contain "There is at least one duplicate key in your configuration file"
|
||||
Then the output should not contain "There is at least one duplicate key in your configuration file"
|
||||
|
|
17
tests/data/configs/linewrap_auto.yaml
Normal file
17
tests/data/configs/linewrap_auto.yaml
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue