diff --git a/test/text.t.cpp b/test/text.t.cpp index 23d0e4490..b4772ab4e 100644 --- a/test/text.t.cpp +++ b/test/text.t.cpp @@ -34,7 +34,7 @@ Context context; //////////////////////////////////////////////////////////////////////////////// int main (int argc, char** argv) { - UnitTest t (208); + UnitTest t (213); // void wrapText (std::vector & lines, const std::string& text, const int width) std::string text = "This is a test of the line wrapping code."; @@ -416,6 +416,13 @@ int main (int argc, char** argv) // std::string format (double, int, int); + // std::string printable (const std::string&); + t.is (printable ("a\rb"), "a\\rb", "printable -> \\r"); + t.is (printable ("a\nb"), "a\\nb", "printable -> \\n"); + t.is (printable ("a\fb"), "a\\fb", "printable -> \\f"); + t.is (printable ("a\tb"), "a\\tb", "printable -> \\t"); + t.is (printable ("a\vb"), "a\\vb", "printable -> \\v"); + return 0; }