diff options
author | Oscar Nihlgård <oscarnihlgard@gmail.com> | 2018-04-23 11:09:48 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-23 11:09:48 +0200 |
commit | 8caf257607e0b76f103155add7849fb934371678 (patch) | |
tree | 5c8dad266a3d174763f43070a7947dc0ee110b75 /tests | |
parent | 72dfe176f5211f561263984a2df653f16dcf5466 (diff) | |
download | Nim-8caf257607e0b76f103155add7849fb934371678.tar.gz |
Don't escape multibyte characters (#7570)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/collections/tcollections_to_string.nim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/collections/tcollections_to_string.nim b/tests/collections/tcollections_to_string.nim index 6cc8a84ff..48b06a6aa 100644 --- a/tests/collections/tcollections_to_string.nim +++ b/tests/collections/tcollections_to_string.nim @@ -85,14 +85,20 @@ block: s.addQuoted('\0') s.addQuoted('\31') s.addQuoted('\127') - s.addQuoted('\255') - doAssert s == "'\\x00''\\x1F''\\x7F''\\xFF'" + doAssert s == "'\\x00''\\x1F''\\x7F'" block: var s = "" s.addQuoted('\\') s.addQuoted('\'') s.addQuoted('\"') doAssert s == """'\\''\'''\"'""" +block: + var s = "" + s.addQuoted("å") + s.addQuoted("ä") + s.addQuoted("ö") + s.addEscapedChar('\xFF') + doAssert s == """"å""ä""ö"\xFF""" # Test customized element representation type CustomString = object |