add a unit test I added in the previous branch.

not really necessary, since it was really for a regression that was
added in that branch, but I figured I'd keep it.
some doc changes