test: add hook macro test

From issue #357.
Merge pull request #363 from jpoimboe/add-hook-test

test: add hook macro test