@@ -20,6 +20,29 @@ Feature: Targeting rules
2020 | some -email -targeted -flag | hi |
2121 | some -other -email -targeted -flag | yes |
2222
23+ @evaluator-refs @evaluator-refs-whitespace
24+ Scenario Outline : Evaluator $ref resolves regardless of whitespace around the colon
25+ Given a String-flag with key "<key>" and a default value "fallback"
26+ And a context containing a key "email" , with type "String" and with value "<email>"
27+ When the flag was evaluated with details
28+ Then the resolved details value should be "<value>"
29+ And the reason should be "TARGETING_MATCH"
30+ Examples :
31+ | key | email | value |
32+ | ref -whitespace -compact -flag | ballmer @macrosoft .com | hi |
33+ | ref -whitespace -space -after -colon -flag | ballmer @macrosoft .com | hi |
34+ | ref -whitespace -space -around -colon -flag | ballmer @macrosoft .com | hi |
35+ | ref -whitespace -compact -flag | user @example .com | bye |
36+ | ref -whitespace -space -after -colon -flag | user @example .com | bye |
37+ | ref -whitespace -space -around -colon -flag | user @example .com | bye |
38+
39+ @evaluator-refs @non-existent-evaluator-ref
40+ Scenario : Ref to nonexistent evaluator yields parse error
41+ Given a String-flag with key "ref-to-nonexistent-evaluator-flag" and a default value "fallback"
42+ When the flag was evaluated with details
43+ Then the resolved details value should be "fallback"
44+ And the error-code should be "PARSE_ERROR"
45+
2346 # custom operators
2447 # @fractional-v1: legacy float-based bucketing (abs(hash) / i32::MAX * 100)
2548 # @fractional-v2: high-precision integer bucketing ((hash * totalWeight) >> 32)
0 commit comments