Skip to content

Commit

Permalink
Add test for user-friendly error when exporting YAML to a nonexistent…
Browse files Browse the repository at this point in the history
… directory
  • Loading branch information
micahellison authored and apainintheneck committed Apr 30, 2022
1 parent 691186f commit d27b95b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/bdd/features/format.feature
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,20 @@ Feature: Custom formats
| basic_folder.yaml |
# | basic_dayone.yaml |

Scenario Outline: Exporting YAML to nonexistent directory leads to user-friendly error with no traceback
Given we use the config "<config_file>"
And we use the password "test" if prompted
When we run "jrnl --export yaml --file nonexistent_dir"
Then the output should contain "YAML export must be to individual files"
And the output should not contain "Traceback"

Examples: configs
| config_file |
| basic_onefile.yaml |
| basic_encrypted.yaml |
| basic_folder.yaml |
# | basic_dayone.yaml | @todo

@skip_win # @todo YAML exporter does not correctly export emoji on Windows
Scenario Outline: Add a blank line to YAML export if there isn't one already
# https://github.com/jrnl-org/jrnl/issues/768
Expand Down

0 comments on commit d27b95b

Please sign in to comment.