This is a bit more complicated than the usual tests, but not that much. Any opinions on this?
+1
I think that because it is more complicated than usual psql, we may want to comment on the intention of the tests and some of the less-than-common psql elements (\set concatenation, resetting \o, etc). If you see value in that I can amend the patch.
Are there any options on COPY (header, formats) that we think we should test as well?