From 4b4c353bd12f03cc29cfd03c3f1364fcaadbda5d Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Mon, 27 Feb 2023 03:12:58 -0500 Subject: Implement join reactions; joins test works Refaactor claimizing patterns, might not work yet --- test/joins.tcl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/joins.tcl b/test/joins.tcl index 1483f6fa..f18b8832 100644 --- a/test/joins.tcl +++ b/test/joins.tcl @@ -23,9 +23,13 @@ set places [lmap m [Statements::findMatchesJoining \ {dict get $m place}] assert {$places eq {{New York} {Sesame Street}}} -# Assert when /x/ is a person & /x/ lives in /place/ { -# set ::foundX $x -# } -# Step +Assert when /x/ is a person & /x/ lives in /place/ { + set ::found$x $place +} +Assert Ash is a person +Assert Ash lives in "Pallet Town" +Step -# assert {$::foundX eq "Omar"} +assert {$::foundOmar eq "New York" && + $::foundElmo eq "Sesame Street" && + $::foundAsh eq "Pallet Town"} -- cgit v1.2.3