Improved tests and support for "special inputs" and buffers.