The Buddha gave some specific advice about this. In the Canki Sutta (MN 95):
How is truth discovered? Here a bhikkhu lives near some village or town. Then a householder or his son goes to him in order to test him in three kinds of ideas, in ideas provocative of greed, of hate, and of delusion, wondering, "Are there in this venerable one any such ideas, whereby his mind being obsessed he might not knowing, say 'I know,' unseeing, say 'I see,' or to get others to do likewise, which would be long for their harm and suffering?" While thus testing him he comes to find that there are no such ideas in him, and he finds that, "The bodily and verbal behavior of that venerable one are not those of one affected by lust or hate or delusion. But the True Idea that this venerable one teaches is profound, hard to see and discover; yet it is the most peaceful and superior of all, out of reach of logical ratiocination, subtle, for the wise to experience; such a True Idea cannot be taught by one affected by lust or hate or delusion."
http://www.accesstoinsight.org/tipitaka/mn/mn.095x.nymo.html
In the Vimamsaka Sutta (MN 47) he even provides means of testing a Buddha:
Bhikkhus, by the bhikkhu who could examine the thought processes of another the Thus Gone One should be examined on two things. On things cognisable by eye consciousness and ear consciousness. Are defiled things cognisable by eye and ear consciousness evident in the Thus Gone One or are they not? When examining he knows. These defiled things cognisable by eye and ear consciousness (*1) are not evident in the Thus Gone One. Then he should make a further examination: Are mixed things cognisable by eye and ear consciousness evident in the Thus Gone One or are they not? When examining he knows. These mixed things cognisable by eye and ear consciousness (*2) are not evident in the Thus Gone One. Then he should make a further examination: Are pure things cognisable by eye and ear consciousness evident in the Thus Gone One or are they not? When examining he knows. The pure things cognisable by eye and ear consciousness (*3) are evident in the Thus Gone One.
http://www.dhammaweb.net/Tipitaka/read.php?id=81
Finally, in the Thana Sutta (AN 4.192):
"It's through living together that a person's virtue may be known, and then only after a long period, not a short period; by one who is attentive, not by one who is inattentive; by one who is discerning, not by one who is not discerning.
"It's through dealing with a person that his purity may be known, and then only after a long period, not a short period; by one who is attentive, not by one who is inattentive; by one who is discerning, not by one who is not discerning.
"It's through adversity that a person's endurance may be known, and then only after a long period, not a short period; by one who is attentive, not by one who is inattentive; by one who is discerning, not by one who is not discerning.
"It's through discussion that a person's discernment may be known, and then only after a long period, not a short period; by one who is attentive, not by one who is inattentive; by one who is discerning, not by one who is not discerning.
http://www.accesstoinsight.org/tipitaka/an/an04/an04.192.than.html
There's a story Mahasi Sayadaw told about how when asked by his attendant whether he was enlightened, an arahant himself said, "It's difficult to know whether one is enlightened. Even a monk attending on an arahant wouldn't know it." Or something like that; it was an oblique means of telling his student that he was enlightened. Can't find the story, sorry.
The point is, it is difficult to tell whether someone else is enlightened. It is much easier to tell whether someone is unenlightened, because if they get angry, greedy or deluded, you can be sure they are not enlightened.