Fixes subexes tests which were broken in 73e48f9c9.

This commit is contained in:
Dominik Picheta 2016-04-05 23:08:51 +01:00
commit c36421f8e4

View file

@ -390,11 +390,11 @@ when isMainModule:
doAssert(("type MyEnum* = enum\n $', '2i'\n '{..}" % ["fieldA", doAssert(("type MyEnum* = enum\n $', '2i'\n '{..}" % ["fieldA",
"fieldB", "FiledClkad", "fieldD", "fieldE", "longishFieldName"]).replace(" \n", "\n") == "fieldB", "FiledClkad", "fieldD", "fieldE", "longishFieldName"]).replace(" \n", "\n") ==
strutils.unindent """ strutils.unindent("""
type MyEnum* = enum type MyEnum* = enum
fieldA, fieldB, fieldA, fieldB,
FiledClkad, fieldD, FiledClkad, fieldD,
fieldE, longishFieldName""") fieldE, longishFieldName""", 6))
doAssert subex"$1($', '{2..})" % ["f", "a", "b", "c"] == "f(a, b, c)" doAssert subex"$1($', '{2..})" % ["f", "a", "b", "c"] == "f(a, b, c)"
@ -404,8 +404,8 @@ when isMainModule:
doAssert((subex("type\n Enum = enum\n $', '40c'\n '{..}") % [ doAssert((subex("type\n Enum = enum\n $', '40c'\n '{..}") % [
"fieldNameA", "fieldNameB", "fieldNameC", "fieldNameD"]).replace(" \n", "\n") == "fieldNameA", "fieldNameB", "fieldNameC", "fieldNameD"]).replace(" \n", "\n") ==
strutils.unindent """ strutils.unindent("""
type type
Enum = enum Enum = enum
fieldNameA, fieldNameB, fieldNameC, fieldNameA, fieldNameB, fieldNameC,
fieldNameD""") fieldNameD""", 6))