mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Add tests for the excluding tags with -not
This commit is contained in:
parent
0a1966e3b3
commit
31a4607a7d
1 changed files with 32 additions and 0 deletions
|
@ -50,3 +50,35 @@ Feature: Tagging
|
|||
@foo : 1
|
||||
@bar : 1
|
||||
"""
|
||||
|
||||
Scenario: Excluding a tag should filter it
|
||||
Given we use the config "basic.yaml"
|
||||
When we run "jrnl today: @foo came over, we went to a bar"
|
||||
When we run "jrnl I have decided I did not enjoy that @bar"
|
||||
When we run "jrnl --tags -not @bar"
|
||||
Then the output should be
|
||||
"""
|
||||
@foo : 1
|
||||
"""
|
||||
|
||||
Scenario: Excluding a tag should filter an entry, even if an unfiltered tag is in that entry
|
||||
Given we use the config "basic.yaml"
|
||||
When we run "jrnl today: I do @not think this will show up @thought"
|
||||
When we run "jrnl today: I think this will show up @thought"
|
||||
When we run "jrnl --tags -not @not"
|
||||
Then the output should be
|
||||
"""
|
||||
@thought : 1
|
||||
"""
|
||||
|
||||
Scenario: Excluding multiple tags should filter them
|
||||
Given we use the config "basic.yaml"
|
||||
When we run "jrnl today: I do @not think this will show up @thought"
|
||||
When we run "jrnl today: I think this will show up @thought"
|
||||
When we run "jrnl today: This should @never show up @thought"
|
||||
When we run "jrnl today: What a nice day for filtering @thought"
|
||||
When we run "jrnl --tags -not @not @never"
|
||||
Then the output should be
|
||||
"""
|
||||
@thought : 2
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue