That depends on your state though right? Do diesels even have emission testing in most states?
But, you would have to convince them to change the "G" on your title to a "D" to become smog check exempt if you do swap from a gas to a diesel. I've heard confliciting stories of that you simply ask them to do so all the way to having to go to a thorough inspection of the swap. They have, or at least had a program to certify cars with swapped engines for the correct emissions regime and they knew pretty well what to look for that wasn't legal, but mostly they were looking at people swapping 350s into Camaros and all the rice rocket Japanese stuff.
They put the color on your car paperwork???