mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-01 19:44:44 +00:00
enable experimental:strictDefs (#24225)
This commit is contained in:
@@ -79,7 +79,7 @@ pkg "hts", "nim c -o:htss src/hts.nim"
|
||||
pkg "httpauth"
|
||||
pkg "httputils"
|
||||
pkg "illwill", "nimble examples"
|
||||
pkg "inim"
|
||||
# pkg "inim"
|
||||
pkg "itertools", "nim doc src/itertools.nim"
|
||||
pkg "iterutils"
|
||||
pkg "json_rpc"
|
||||
@@ -138,7 +138,7 @@ pkg "plotly", "nim c examples/all.nim"
|
||||
pkg "pnm"
|
||||
pkg "polypbren"
|
||||
pkg "presto"
|
||||
pkg "prologue", "nimble tcompile"
|
||||
# pkg "prologue", "nimble tcompile"
|
||||
pkg "protobuf", "nim c -o:protobuff -r src/protobuf.nim"
|
||||
pkg "rbtree"
|
||||
pkg "react", "nimble example"
|
||||
|
||||
@@ -38,6 +38,7 @@ proc splitTestFile*(file: string): tuple[cat: string, path: string] =
|
||||
## At least one directory is required in the path, to use as a category name
|
||||
runnableExamples:
|
||||
doAssert splitTestFile("tests/fakedir/tfakename.nim") == ("fakedir", "tests/fakedir/tfakename.nim".unixToNativePath)
|
||||
result = ("", "")
|
||||
for p in file.parentDirs(inclusive = false):
|
||||
let parent = p.parentDir
|
||||
if parent.lastPathPart == testsFname:
|
||||
|
||||
@@ -6,13 +6,18 @@ proc mismatch*[T](lhs: T, rhs: T): string =
|
||||
## while avoiding pulling too many dependencies. On failure, diagnostic
|
||||
## information is provided that in particular makes it easy to spot
|
||||
## whitespace mismatches and where the mismatch is.
|
||||
result = ""
|
||||
|
||||
proc replaceInvisible(s: string): string =
|
||||
result = ""
|
||||
for a in s:
|
||||
case a
|
||||
of '\n': result.add "\\n\n"
|
||||
else: result.add a
|
||||
|
||||
proc quoted(s: string): string = result.addQuoted s
|
||||
proc quoted(s: string): string =
|
||||
result = ""
|
||||
result.addQuoted s
|
||||
|
||||
result.add '\n'
|
||||
result.add "lhs:{" & replaceInvisible(
|
||||
|
||||
Reference in New Issue
Block a user