fixed bug in unittest for text output