add tests for pattern dir precedence