mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-04 15:36:14 +02:00
move overrides earlier in the execution
use existing configs instead of custom make format clean up imports
This commit is contained in:
parent
c8e09b023f
commit
1df4b74e53
5 changed files with 23 additions and 27 deletions
|
@ -1,7 +1,8 @@
|
|||
Feature: Implementing Runtime Overrides for Select Configuration Keys
|
||||
|
||||
Scenario: Override configured editor with built-in input === editor:''
|
||||
Given we use the config "tiny.yaml"
|
||||
Given we use the config "basic_encrypted.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl --config-override editor ''"
|
||||
Then the stdin prompt should have been called
|
||||
|
||||
|
@ -11,11 +12,12 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys
|
|||
When we run "jrnl --decrypt --config-override highlight false --config-override editor nano"
|
||||
Then the runtime config should have "encrypt" set to "false"
|
||||
And the runtime config should have "highlight" set to "false"
|
||||
And the editor "nano" should have been called
|
||||
And the editor "N/A" should have been called
|
||||
|
||||
@skip_win
|
||||
Scenario: Override configured linewrap with a value of 23
|
||||
Given we use the config "tiny.yaml"
|
||||
Given we use the config "simple.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl -2 --config-override linewrap 23 --format fancy"
|
||||
Then the output should be
|
||||
|
||||
|
@ -37,13 +39,15 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys
|
|||
|
||||
@skip_win
|
||||
Scenario: Override color selections with runtime overrides
|
||||
Given we use the config "tiny.yaml"
|
||||
Given we use the config "basic_encrypted.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl -1 --config-override colors.body blue"
|
||||
Then the runtime config should have colors.body set to blue
|
||||
|
||||
@skip_win
|
||||
Scenario: Apply multiple config overrides
|
||||
Given we use the config "tiny.yaml"
|
||||
Given we use the config "basic_encrypted.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl -1 --config-override colors.body green --config-override editor 'nano'"
|
||||
Then the runtime config should have colors.body set to green
|
||||
And the runtime config should have editor set to nano
|
||||
|
@ -51,11 +55,12 @@ Feature: Implementing Runtime Overrides for Select Configuration Keys
|
|||
|
||||
@skip_win
|
||||
Scenario Outline: Override configured editor
|
||||
Given we use the config "tiny.yaml"
|
||||
When we run "jrnl --config-override editor \"<editor>\""
|
||||
Given we use the config "basic_encrypted.yaml"
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl --config-override editor '<editor>'"
|
||||
Then the editor <editor> should have been called
|
||||
Examples: Editor Commands
|
||||
| editor |
|
||||
| nano |
|
||||
| vi -c startinsert |
|
||||
| code -w - |
|
||||
| code -w |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue