def METHOD_NAME(self, f=output.shorten_string_eaw):
    s = "01234567890123456789"  # 20 ascii characters
    self.assertEqual(f(s, 20, "|---|"), s)
    self.assertEqual(f(s, 19, "|---|"), "0123456|---|3456789")
    self.assertEqual(f(s, 15, "|---|"), "01234|---|56789")
    self.assertEqual(f(s, 10, "|---|"), "01|---|789")
    self.assertEqual(f(s, 19, "..."), "01234567...23456789")
    self.assertEqual(f(s, 19, "..") , "01234567..123456789")
    self.assertEqual(f(s, 19, ".")  , "012345678.123456789")
    self.assertEqual(f(s, 19, "")   , "0123456780123456789")