test: generalise the test matching

The value names may change in different builds, use pattern based tests.