Rename directory for back-end tests

This commit is contained in:
Andrey Breslav
2013-11-26 20:34:10 +04:00
parent fe00b03279
commit c70a54306f
25 changed files with 54 additions and 54 deletions
@@ -0,0 +1,16 @@
fun escapeChar(c : Char) : String? = when (c) {
'\\' -> "\\\\"
'\n' -> "\\n"
'"' -> "\\\""
else -> "" + c
}
tailRecursive fun String.escape(i : Int = 0, result : StringBuilder = StringBuilder()) : String =
if (i == length) result.toString()
else escape(i + 1, result.append(escapeChar(get(i))))
fun box() : String {
"test me not \\".escape()
return "OK"
}