Add tests for pattern support