Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Dec 28, 2022
1 parent 8d49a26 commit 2379dec
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
40 changes: 40 additions & 0 deletions tests/tck/features/match/Base.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -593,3 +593,43 @@ Feature: Basic match
Then the result should be, in any order:
| v |
| ("Boris Diaw" :player{age: 36, name: "Boris Diaw"}) |

Scenario: match with tag filter
When executing query:
"""
MATCH (a:team)-[e*0..1]-(b) where id(a) == hash('Tim Duncan') return b
"""
Then the result should be, in any order, with relax comparison:
| b |
When executing query:
"""
MATCH (a:team)-[e*0..0]-(b) where id(a) in [hash('Tim Duncan'), hash('Spurs')] return b
"""
Then the result should be, in any order, with relax comparison:
| b |
| ('Spurs') |
When executing query:
"""
MATCH (a:team)-[e*0..1]-(b) where id(a) in [hash('Tim Duncan'), hash('Spurs')] return b
"""
Then the result should be, in any order, with relax comparison:
| b |
| ("Spurs") |
| ("Aron Baynes") |
| ("Boris Diaw") |
| ("Cory Joseph") |
| ("Danny Green") |
| ("David West") |
| ("Dejounte Murray") |
| ("Jonathon Simmons") |
| ("Kyle Anderson") |
| ("LaMarcus Aldridge") |
| ("Manu Ginobili") |
| ("Marco Belinelli") |
| ("Paul Gasol") |
| ("Rudy Gay") |
| ("Tiago Splitter") |
| ("Tim Duncan") |
| ("Tony Parker") |
| ("Tracy McGrady") |
| ("Marco Belinelli") |
41 changes: 41 additions & 0 deletions tests/tck/features/match/Base.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2020 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License.
@jmq
Feature: Basic match

Background:
Expand Down Expand Up @@ -970,3 +971,43 @@ Feature: Basic match
MATCH (v{name: "Tim Duncan"}) return v
"""
Then a SemanticError should be raised at runtime: `name:"Tim Duncan"': No tag found for property.

Scenario: match with tag filter
When executing query:
"""
MATCH (a:team)-[e*0..1]-(b) where id(a) == 'Tim Duncan' return b
"""
Then the result should be, in any order, with relax comparison:
| b |
When executing query:
"""
MATCH (a:team)-[e*0..0]-(b) where id(a) in ['Tim Duncan', 'Spurs'] return b
"""
Then the result should be, in any order, with relax comparison:
| b |
| ('Spurs') |
When executing query:
"""
MATCH (a:team)-[e*0..1]-(b) where id(a) in ['Tim Duncan', 'Spurs'] return b
"""
Then the result should be, in any order, with relax comparison:
| b |
| ("Spurs") |
| ("Aron Baynes") |
| ("Boris Diaw") |
| ("Cory Joseph") |
| ("Danny Green") |
| ("David West") |
| ("Dejounte Murray") |
| ("Jonathon Simmons") |
| ("Kyle Anderson") |
| ("LaMarcus Aldridge") |
| ("Manu Ginobili") |
| ("Marco Belinelli") |
| ("Paul Gasol") |
| ("Rudy Gay") |
| ("Tiago Splitter") |
| ("Tim Duncan") |
| ("Tony Parker") |
| ("Tracy McGrady") |
| ("Marco Belinelli") |

0 comments on commit 2379dec

Please sign in to comment.