Add unit test for new option output_encoding

Added a unit test for the newly pulled feature.