{.deprecated: [existsFile: fileExists].} (#14735)

* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
This commit is contained in:
Timothee Cour 2020-07-02 07:19:13 -07:00 • committed by GitHub
commit dc5a40f3f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 66 additions and 67 deletions

View file

@ -572,7 +572,7 @@ proc `&.?`(a, b: string): string =
proc processSingleTest(r: var TResults, cat: Category, options, test: string) =
let test = testsDir &.? cat.string / test
let target = if cat.string.normalize == "js": targetJS else: targetC
if existsFile(test):
if fileExists(test):
testSpec r, makeTest(test, options, cat), {target}
else:
doAssert false, test & " test does not exist"

View file

@ -440,7 +440,7 @@ proc testSpecHelper(r: var TResults, test: TTest, expected: TSpec,
else:
let isJsTarget = target == targetJS
var exeFile = changeFileExt(test.name, if isJsTarget: "js" else: ExeExt)
if not existsFile(exeFile):
if not fileExists(exeFile):
r.addResult(test, target, expected.output,
"executable not found: " & exeFile, reExeNotFound)
else: