The switch is a grounding switch. To test it remove the one wire on the top of it and ground it to anything metal and the light should come on. If that works the switch is dirty or needs to be replaced.
Very simple to check
I like to mess with the kids and have them check to see if the light goes out. I have them get in the trunk and close it then take them for a hard ride
Did it to the wife one time and she was pissed