Sure I drove it off the lot everybody's driven illegally at some point but still they sold it and let me test drive the car without a license
I've never driven without a license, and I've never broken ONE of THEIR laws.
I'm not bragging, I'm just saying that its unwise to assume EVERYONE has done what you've done.
That said, you have no case against the dealer for selling you a car.
I've known several people who never had a drivers license, but owned several cars.
My maternal grandmother, while driving a Model T Ford (yeah, way back around 1910) hit a man riding a bicycle. It wasn't her fault, the man ran into her car after being startled by an excited mule pulling delivery wagon along a muddy, unpaved street in Pt. Arthur, TX. From that day forward, grandmother never drove another car. Grandmother and grandfather were wealthy and he hired her a chauffeur. If grandfather didn't drive her around town, the chauffeur did.
It wasn't until 1935 when Texas required people to obtain a license to drive a car. Not so unusual, because you never had to have one to ride a horse or operate a horse drawn buggy. But, grandmother never obtained that license, because she had sworn off ever driving so as to avoid ever hurting another human being. My goodness, weren't people great back then?
Grandmother died after living for 105 years without ever having a drivers license. She was born in 1875 and died in 1980. My point, she never broke any of THEIR laws, either, and she disagreed with most of them.
My point is that you had the right to buy a car, because you're old enough to do so. Its your responsibility to obtain a drivers license, if you want to legally drive that car. But, maybe you're a trust fund kid and like to collect expensive cars. If that's your thing, no license is needed for that, is there?
The dealer should have asked you for your license before allowing you to test drive their car. I guess you must have an honest looking face, so they trusted you. You can sue them, if sue you must. But, I don't see your lawsuit causing them much fuss. You have no case on which a remedy should issue, because you weren't damaged, harmed, or made to suffer.