assembly - The point of test %eax %eax - Stack Overflow
You are right, that test "and"s the two operands. But the result is discarded, the only thing that stays, and thats the important part, are the flags. They are set and thats the reason why the test instruction is used (and exist).. JE jumps not when equal (it has the meaning when the instruction before was a comparison), what it really does, it jumps when the ZF flag is set.
DA: 36 PA: 82 MOZ Rank: 85