patman: Add a functional test