alpha test for texture

I have a texture and I want to reject some portion of pixels by alpha test. But it looks that the alpha test is useless for texture mapping. I set every pixel’s alpha value and enable alpha test. but no pixel is rejected when I map the texture.
Is there some way by which I can reject some pixels in a texture?

Thanks.

That’s what the ref value in glAlphaFunc is for. The other argument specifies the test.