@@ -14,9 +14,13 @@ func TestChannels(t *testing.T) {
1414 Expected string
1515 }{
1616 {
17- Cmd : channels .SetChan ("foo" , geofence .Roam ("cat" , "dog" , "*" , 50 ).Actions (Enter , Exit )).toCmd (),
17+ Cmd : channels .SetChan ("foo" , geofence .Roam ("cat" , "dog" , "*" , 50 , false ).Actions (Enter , Exit )).toCmd (),
1818 Expected : "SETCHAN foo NEARBY cat FENCE DETECT enter,exit ROAM dog * 50" ,
1919 },
20+ {
21+ Cmd : channels .SetChan ("foo" , geofence .Roam ("cat" , "dog" , "*" , 50 , true ).Actions (Enter , Exit )).toCmd (),
22+ Expected : "SETCHAN foo NEARBY cat FENCE NODWELL DETECT enter,exit ROAM dog * 50" ,
23+ },
2024 }
2125
2226 for _ , test := range tests {
@@ -32,9 +36,13 @@ func TestHooks(t *testing.T) {
3236 Expected string
3337 }{
3438 {
35- Cmd : hooks .SetHook ("foo" , "localhost:1337" , geofence .Roam ("cat" , "dog" , "*" , 50 ).Actions (Enter , Exit )).toCmd (),
39+ Cmd : hooks .SetHook ("foo" , "localhost:1337" , geofence .Roam ("cat" , "dog" , "*" , 50 , false ).Actions (Enter , Exit )).toCmd (),
3640 Expected : "SETHOOK foo localhost:1337 NEARBY cat FENCE DETECT enter,exit ROAM dog * 50" ,
3741 },
42+ {
43+ Cmd : hooks .SetHook ("foo" , "localhost:1337" , geofence .Roam ("cat" , "dog" , "*" , 50 , true ).Actions (Enter , Exit )).toCmd (),
44+ Expected : "SETHOOK foo localhost:1337 NEARBY cat FENCE NODWELL DETECT enter,exit ROAM dog * 50" ,
45+ },
3846 }
3947
4048 for _ , test := range tests {
@@ -107,12 +115,19 @@ func TestGeofence(t *testing.T) {
107115 Expected : "NEARBY fleet CLIP CURSOR 5 FENCE DETECT enter,exit,cross COMMANDS set,del HASHES 5 POINT 10 20 30" ,
108116 },
109117 {
110- Cmd : geofence .Roam ("agent" , "target" , "*" , 100 ).
118+ Cmd : geofence .Roam ("agent" , "target" , "*" , 100 , false ).
111119 Distance ().
112120 Wherein ("price" , 20 , 30 ).
113121 WhereEval ("foo" , "arg1" , "arg2" ).toCmd (),
114122 Expected : "NEARBY agent WHEREIN price 2 20 30 WHEREEVAL foo 2 arg1 arg2 DISTANCE FENCE ROAM target * 100" ,
115123 },
124+ {
125+ Cmd : geofence .Roam ("agent" , "target" , "*" , 100 , true ).
126+ Distance ().
127+ Wherein ("price" , 20 , 30 ).
128+ WhereEval ("foo" , "arg1" , "arg2" ).toCmd (),
129+ Expected : "NEARBY agent WHEREIN price 2 20 30 WHEREEVAL foo 2 arg1 arg2 DISTANCE FENCE NODWELL ROAM target * 100" ,
130+ },
116131 {
117132 Cmd : geofence .Within ("foo" ).
118133 Bounds (10 , 20 , 30 , 40 ).
0 commit comments