mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-27 21:16:14 +02:00
Create folder if config ends with (back)slash (#1492)
* Check config if FolderJournal and treat as so * Add test for end of path is slash * Code format correction * Requested changes PR 1482 * Add info to doc about path of folder. * Small addition to doc about folder journal
This commit is contained in:
parent
1c35c6951d
commit
e758986985
5 changed files with 38 additions and 3 deletions
|
@ -30,6 +30,24 @@ Feature: Journals iteracting with the file system in a way that users can see
|
|||
Then the journal should exist
|
||||
When we run "jrnl -99 --short"
|
||||
Then the output should contain "This is a new entry in my journal"
|
||||
|
||||
@on_posix
|
||||
Scenario: If the directory for a Folder journal ending in a slash ('/') doesn't exist, then it should be created
|
||||
Given we use the config "missing_directory.yaml"
|
||||
Then the journal "endslash" directory should not exist
|
||||
When we run "jrnl endslash This is a new entry in my journal"
|
||||
Then the journal "endslash" directory should exist
|
||||
When we run "jrnl endslash -1"
|
||||
Then the output should contain "This is a new entry in my journal"
|
||||
|
||||
@on_win
|
||||
Scenario: If the directory for a Folder journal ending in a backslash ('\') doesn't exist, then it should be created
|
||||
Given we use the config "missing_directory.yaml"
|
||||
Then the journal "endbackslash" directory should not exist
|
||||
When we run "jrnl endbackslash This is a new entry in my journal"
|
||||
Then the journal "endbackslash" directory should exist
|
||||
When we run "jrnl endbackslash -1"
|
||||
Then the output should contain "This is a new entry in my journal"
|
||||
|
||||
Scenario: Creating journal with relative path should update to absolute path
|
||||
Given we use no config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue