There's not a lot you can test (or an owner will let you test) while buying a car. Most of your inspection will be after purchasing. In any scenario, any corolla, civic, lancer, etc. around 2005 model you buy now will have a lot of pending work.............I like to call it that the car will need a mid-service overhaul. You'll need to spend quite a lot of money on good parts to make it run nicely and reliably again. Complete suspension overhaul, brand new coils, brand new sensors, other engine bay work like power steering work, AC work, engine foundations, cooling system work, flushing all oils and fluids, possibly interior poshish and seats foaming/poshish, etc.
Keep at least 4 lacs above the purchase price of the car in your budget if you want to end up with a car that runs reliably.