make JS tests green again
This commit is contained in:
parent
50d4224d41
commit
6ae9341d48
2 changed files with 5 additions and 5 deletions
|
|
@ -55,11 +55,11 @@ proc reprStrAux(result: var string, s: cstring, len: int) =
|
|||
case c
|
||||
of '"': add(result, "\\\"")
|
||||
of '\\': add(result, "\\\\")
|
||||
of '\10': add(result, "\\10\"\n\"")
|
||||
of '\127'..'\255', '\0'..'\9', '\11'..'\31':
|
||||
add( result, "\\" & reprInt(ord(c)) )
|
||||
#of '\10': add(result, "\\10\"\n\"")
|
||||
of '\127'..'\255', '\0'..'\31':
|
||||
add(result, "\\" & reprInt(ord(c)))
|
||||
else:
|
||||
add( result, reprInt(ord(c)) ) # Not sure about this.
|
||||
add(result, c)
|
||||
add(result, "\"")
|
||||
|
||||
proc reprStr(s: string): string {.compilerRtl.} =
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ block strings:
|
|||
when defined js: # C prepends the pointer, JS does not.
|
||||
doAssert(repr(a) == "\"12345\"")
|
||||
doAssert(repr(b) == "\"hello,repr\"")
|
||||
doAssert(repr(c) == "\"hi\nthere\"")
|
||||
doAssert(repr(c) == "\"hi\\10there\"")
|
||||
|
||||
block sets:
|
||||
let
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue