Skip to content

Commit 87348ee

Browse files
Test variables appearing outside & in only some branches of the disjunction are input (#375)
## Usage and product changes Test variables appearing outside & in only some branches of the disjunction are input
1 parent 913455b commit 87348ee

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

query/language/disjunction.feature

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,23 @@ Feature: TypeQL Disjunction
192192
| key:ref:2 | attr:ref:2 |
193193

194194

195+
Scenario: Variables appearing outside the disjunction and in only some branches of the disjunction
196+
must be input to the disjunction. See #7475
197+
Given typeql write query
198+
"""
199+
insert
200+
$_ isa person, has ref 0;
201+
$_ isa person, has ref 1;
202+
$_ isa person, has ref 2;
203+
"""
204+
Given transaction commits
205+
When connection open read transaction for database: typedb
206+
Then get answers of typeql read query
207+
"""
208+
match
209+
{ $a isa! $_; } or { $_ isa! $_; };
210+
{ $a is $b; $b isa! $_; } or { $a isa! $_; };
211+
"""
212+
# If we don't crash in the previous step, we're good.
213+
Then transaction closes
214+

0 commit comments

Comments
 (0)