Car knocks off randomly while driving

So this has been and ongoing string of issues with this car. I bought an old used car about two weeks ago. I was told that the car had been sitting for awhile and the battery wasnt really holding a charge. It started and ran fine the first couple of days then i would find that the battery was dead and needed to be jumped to start. after a couple of days with this happening every now and then, it got to the point where in order to start the car it had to be jumped. sometimes the car would just stall out while driving and i could then jump it and be on my way. Yesterday the car stalled while driving but it would not jump. I bought a new battery and put it in the car, it started up fine, i drove it home. I self tested the alternator and it was running fine. I left for work this morning, drove about 6 or 7 miles and as i was getting on the onramp to the highway, the steering wheel started to vibrate as the engine tried not to cut off, but the car did indeed cut off. i couldnt restart it immediately but after it sat for about 15 minutes i was then able to start the car. I drove straight to the nearest advance auto about 3 miles away where they tested the alternator battery and starter. everything came up good. i drove the car home, not wanting to test my luck further. I’m thinking that there’s something causeing the car to knock off while driving and now that i replaced the bad battery i’m able to restart the car without jumping it later. my question is what’s causing the car to knock off? any ideas?

This is a 1990 plymouth acclaim. I should mention that the car has a small oil leak from the head that i noticed yesterday as i was changing the battery. could this be a cause?

A small oil leak will not cause your engine to stall. What procedure did you use to “self test” the alternator? If you are simply disconnecting a battery cable while the engine is running you probably caused damage to the alternator. When you tried to restart…what was happening? Did the engine turn over but just didn’t start? You may have an ignition switch or neutral safety switch problem but we need your answer to clear up some missing parts of the puzzle.

I did remove the battery cable to test the alternator ( someone had told me thats what i needed to do) but advance auto checked the alternator starter and the new battery this morning after i was able to get it started and it all tested as good. after the car stalled this morning it was trying to turn over but just wouldnt start. but 15 minutes later it finally did start and it started fine again after stopping at advance and made the 5 minute drive home with no problems.

You probably need to have the alternator load tested if the battery goes dead again. Never remove a battery cable with the engine running. What fuel delivery system do you have? FI, carb or TBI?

The alternator load was tested this morning and was normal. It is a fuel injected system

Try spraying starter fluid in your intake just before starting. If it fires right up you have a problem with fuel delivery. If it does not start right up then check for spark and go from there. It might be a bad ignition switch. There are too many variables here for a quick and proper diagnosis.