Skip to content

Commit

Permalink
Test leading digit is allowed in TypeQL Variables (#281)
Browse files Browse the repository at this point in the history
## Usage and product changes

We test that variables can contain leading digits, while labels may not.
  • Loading branch information
flyingsilverfin authored Feb 14, 2024
1 parent 031ab43 commit 9608d28
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions query/language/match.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2588,3 +2588,42 @@ Feature: TypeQL Match Clause
| key:ref:1 |


Scenario: labels and variables have different identifier formats
Given typeql define; throws exception
"""
define
0_leading_digit_fails sub entity;
"""
Given get answers of typeql get
"""
match
$0_leading_digit_allowed sub entity;
?0_leading_digit_allowed_val = 0;
get;
"""

Given typeql define; throws exception
"""
define
_leading_connector_disallowed sub entity;
"""
Given typeql get; throws exception
"""
match
$_leading_connector_disallowed sub entity;
?_leading_connector_disallowed_val = 0;
get;
"""

Given typeql define
"""
define
following_connectors-and-digits-1-2-3-allowed sub entity;
"""
Given get answers of typeql get
"""
match
$following_connectors-and-digits-1-2-3-allowed sub entity;
?following_connectors-and-digits-1-2-3-allowed_val = 0;
get;
"""

0 comments on commit 9608d28

Please sign in to comment.