A user accepted this answer, but he says in a comment that he already figure out the answer by himself and that he accepted mine because I answered but he didn't actually test it. What should I do in this case?, I posted a comment telling him that he shouldn't just accept my answer if he doesn't know if it works, but its still mark as accepted. Is there anything else I should do?
What can you do?
The only damage control that needs to be done is prevent future visitors from believing your answer is a proven solution. A comment to that effect should suffice, or text to that effect in your answer (hopefully when you initially posted your answer).
In the example you linked to, I don't think a whole lot needs to be done... The comments tell the story. Any future visitor will see that. If they don't, they'll realize the solution isn't correct/complete when they try it on their own and find it lacking.
What should happen is beyond your control: The OP should post his solution as an answer and accept it instead of your answer.
Is there anything else I should do?
No, you did everything you could and kudos for that. It's now up to the asker to decide whether they unaccept your answer or not. Even if they don't unaccept, the two comments are warning enough that the solution you propose might not work.
I'd venture a guess and say that this is a byproduct of people getting pestered all the time to improve their accept rate, and we really need to put an end to this highly unproductive behaviour.