Add test for rule codes. Issue #156.