mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
Add methods for simpler newlines (#246)
This commit is contained in:

committed by
Patrick Kanzler

parent
81426ab6dc
commit
b64b534394
@@ -39,3 +39,27 @@ def test_block_text():
|
||||
"All the presidents men were eating falafel for breakfast.", font='a')
|
||||
assert printer.output == \
|
||||
b'All the presidents men were eating falafel\nfor breakfast.'
|
||||
|
||||
|
||||
def test_textln():
|
||||
printer = get_printer()
|
||||
printer.textln('hello, world')
|
||||
assert printer.output == b'hello, world\n'
|
||||
|
||||
|
||||
def test_textln_empty():
|
||||
printer = get_printer()
|
||||
printer.textln()
|
||||
assert printer.output == b'\n'
|
||||
|
||||
|
||||
def test_ln():
|
||||
printer = get_printer()
|
||||
printer.ln()
|
||||
assert printer.output == b'\n'
|
||||
|
||||
|
||||
def test_multiple_ln():
|
||||
printer = get_printer()
|
||||
printer.ln(3)
|
||||
assert printer.output == b'\n\n\n'
|
||||
|
Reference in New Issue
Block a user