test with 😄 in message

This commit is contained in:
Daniel Hahler 2019-04-05 16:08:11 +02:00
parent 159704421e
commit f599172add
1 changed files with 8 additions and 0 deletions

View File

@ -1255,3 +1255,11 @@ def test_line_with_reprcrash(monkeypatch):
assert f(config, rep, 25) == "FAILED some::nodeid - ..." assert f(config, rep, 25) == "FAILED some::nodeid - ..."
assert f(config, rep, 26) == "FAILED some::nodeid - some" assert f(config, rep, 26) == "FAILED some::nodeid - some"
assert f(config, rep, 80) == "FAILED some::nodeid - some" assert f(config, rep, 80) == "FAILED some::nodeid - some"
# Test unicode safety.
rep.longrepr.reprcrash.message = "😄😄😄😄😄\n2nd line"
assert f(config, rep, 26) == "FAILED some::nodeid - 😄..."
# XXX: this is actually wrong - since the character uses two terminal
# cells.
rep.longrepr.reprcrash.message = "😄😄😄😄\n2nd line"
assert f(config, rep, 26) == "FAILED some::nodeid - 😄😄😄😄"