escape.nim 184 B

12345678
  1. import nre, unittest
  2. suite "escape strings":
  3. test "escape strings":
  4. check("123".escapeRe() == "123")
  5. check("[]".escapeRe() == r"\[\]")
  6. check("()".escapeRe() == r"\(\)")