There is a Bug in version 7.07, the inkey dont return the number of the key. I have the same problem. Use:

inkey(test);
if (result == 13)

and not:

result = inkey(test);
if (result == 13)