pact-foundation / pact-reference

Reference implementations for the pact specifications
https://pact.io
MIT License
91 stars 46 forks source link

pact_consumer term! example doesn't match prose, and appears to contain accidental copy-pasta #424

Closed mjpieters closed 1 month ago

mjpieters commented 1 month ago

This is the example given in the docstring for the term!() macro:

https://github.com/pact-foundation/pact-reference/blob/e44458a8616856d3726470dd8f3884340999bf1e/rust/pact_consumer/src/patterns/special_rules.rs#L377-L379

There are two issues here:

The same two issues apply to the matching_regex!() macro defined below this.

Side note: Could terms be automatically tested against the given example value? It'd be a good internal consistency check.