Install pytest-bdd (which will eventually replace behave)

- Copy over the current tests from behave into the new directory that
  pytest-bdd will use them in

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2020-12-28 09:45:22 -08:00
parent ace6b8004c
commit 1390493a29
177 changed files with 5065 additions and 340 deletions

View file

@ -0,0 +1,53 @@
Feature: Tagging
# See search.feature for tag-related searches
# And format.feature for tag-related output
Scenario Outline: Tags should allow certain special characters such as /, +, #
Given we use the config "<config>.yaml"
When we run "jrnl 2020-09-26: This is an entry about @os/2 and @c++ and @c#"
When we run "jrnl --tags -on 2020-09-26"
Then we should get no error
And the output should be
"""
@os/2 : 1
@c++ : 1
@c# : 1
"""
Examples: configs
| config |
| basic_onefile |
| basic_folder |
| basic_dayone |
Scenario Outline: Emails addresses should not be parsed as tags
Given we use the config "<config>.yaml"
When we run "jrnl 2020-09-26: The email address test@example.com does not seem to work for me"
When we run "jrnl 2020-09-26: The email address test@example.org also does not work for me"
When we run "jrnl 2020-09-26: I tried test@example.org and test@example.edu too"
Then we flush the output
When we run "jrnl --tags -on 2020-09-26"
Then we should get no error
And the output should be "[No tags found in journal.]"
Examples: configs
| config |
| basic_onefile |
| basic_folder |
| basic_dayone |
Scenario Outline: Entry can start and end with tags
Given we use the config "<config>.yaml"
When we run "jrnl 2020-09-26: @foo came over, we went to a @bar"
When we run "jrnl --tags -on 2020-09-26"
Then the output should be
"""
@foo : 1
@bar : 1
"""
Examples: configs
| config |
| basic_onefile |
| basic_folder |
| basic_dayone |