void () { assertPrintedText(new String[]{"Test", "\b"}, "Tes"); assertPrintedText(new String[]{"Test", "\b", "\b"}, "Te"); assertPrintedText(new String[]{"Hello", "\b\b\b\b", "allo"}, "Hallo"); assertPrintedText(new String[]{"A\b\b\bha\bop", "\bul\bpp", "\b\bsl\be"}, "house"); assertPrintedText(new String[]{"\b\bTest\b\b\b\b\b", "Done", "\b\b\b"}, "D"); assertPrintedText(new String[]{"\b\b\b\b\b\b\b"}, ""); assertPrintedText(new String[]{"The\b\b\b\b", "first lint", "\be\n", "\b\b\bsecond lone", "\b\b\bine\n", "\bthird\b\b\b\b\b\b\b\bthe third line"}, "first line\nsecond line\nthe third line"); assertPrintedText(new String[]{"\n\n\b\bStart\nEnq\bd"}, "\n\nStart\nEnd"); assertPrintedText(new String[]{"\nEnter your pass:", "\rsecreq\bt"}, "\nsecret"); assertPrintedText(new String[]{"test\b\b\b\b\b\bline1\n\blinee\b2\r\n\blin\b\b\b\bline?", "\b3\n", "Done\n"}, "line1\nline2\nline3\nDone\n"); }