Exemple #1
0
    def test_processor_newline(self):
        f = ssterm.input_processor_newline(b"abc")

        self.assertEqual(f(b""), b"")
        self.assertEqual(f(os.linesep.encode()), b"abc")
        self.assertEqual(f(b"foo" + os.linesep.encode() + b"bar"),
                         b"fooabcbar")
Exemple #2
0
    def test_processor_newline(self):
        f = ssterm.input_processor_newline("abc")

        self.assertEqual(f(""), "")
        self.assertEqual(f(os.linesep), "abc")
        self.assertEqual(f("foo" + os.linesep + "bar"), "fooabcbar")
Exemple #3
0
    def test_processor_newline(self):
        f = ssterm.input_processor_newline(b"abc")

        self.assertEqual(f(b""), b"")
        self.assertEqual(f(os.linesep.encode()), b"abc")
        self.assertEqual(f(b"foo" + os.linesep.encode() + b"bar"), b"fooabcbar")