It will set ZF (zero flag) if the register is zero. This is probably what he most often tested. He will also set other flags accordingly, but for them, probably much less.
In addition, I should mention that test does not really perform the comparison - it performs the bitwise operation and (discarding the result, with the exception of flags).
To compare the operands, the cmp command will be used, which performs the sub operation, discarding the results, with the exception of flags. You are right that
cmp $eax, $eax
will not make much sense, since flags will be set in accordance with a zero result each time.
Michael burr
source share