moved tests from TermBuffer to TermWriter