#529: add new tests
#529: add rules, change tests
Merge pull request #530 from mimmi20/issue-529

Fixes #529