I believe a Federal lemon law was passed requiring a new car which has shipping damage in excess of a certain dollar threshold (I think it was $2000) can't be sold as new...don't know about the test drive/wreck scenario.
Years ago my mother ordered a new car, and I used to drive by the dealer every night to see if it was in. So one night--there it is! With huge dents in the hood! I went over there first thing the next morning, and they said that it hadn't been chained down tight enough on the carrier--they wanted to put a new hood on and paint it. I said no way, I wanted the factory baked paint (this was in 1988 when body shops didn't have bake ovens), so they then wanted to swap hoods with another car of the same color that they had on the lot. Fortunately, the color didn't match, so they ordered another car for her, but I am *so* sure if I hadn't seen the damage, they would have just said "it's not in yet" and repainted it real quick.