To be honest I just copy pasted the other tests. The indention is what emacs suggests, should be fine though.
If I interpret your remark correctly after  -trap-temp-file the file should be deleted by the internal mechanisms? If so, the best test would be to create the temporary filename, make sure no such file exists, write the file, and afterwards verify it was properly removed again.