summary refs log tree commit diff stats
path: root/tests/stdlib/tunidecode.nim
blob: 689453c76f75b3980f9a1f6157aee3d7c9a4c5cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
discard """
  cmd: "nim $target --hints:on -d:embedUnidecodeTable $options $file"
  output: "Ausserst"
"""

import unidecode

loadUnidecodeTable("lib/pure/unidecode/unidecode.dat")

#assert unidecode("\x53\x17\x4E\xB0") == "Bei Jing"
echo unidecode("Äußerst")
p418.is4xx() == true assert Http418.is2xx() == false test "headers": var h = newHttpHeaders() assert h.len == 0 h.add("Cookie", "foo") assert h.len == 1 assert h.hasKey("cooKIE") assert h["Cookie"] == "foo" assert h["cookie"] == "foo" h["cookie"] = @["bar", "x"] assert h["Cookie"] == "bar" assert h["Cookie", 1] == "x" assert h["Cookie"].contains("BaR") == true assert h["Cookie"].contains("X") == true assert "baR" in h["cookiE"] h.del("coOKie") assert h.len == 0