typo: nonexistant => nonexistent (#17918)

* typo: nonexistant => nonexistent

* fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
This commit is contained in:
Timothee Cour
2021-05-01 15:26:41 -07:00
committed by GitHub
parent 13b57524d3
commit 78e2d299df
16 changed files with 38 additions and 38 deletions

View File

@@ -38,7 +38,7 @@ block fileOperations:
doAssert dirExists(dname)
block: # copyFile, copyFileToDir
doAssertRaises(OSError): copyFile(dname/"nonexistant.txt", dname/"nonexistant.txt")
doAssertRaises(OSError): copyFile(dname/"nonexistent.txt", dname/"nonexistent.txt")
let fname = "D20201009T112235"
let fname2 = "D20201009T112235.2"
let str = "foo1\0foo2\nfoo3\0"
@@ -164,7 +164,7 @@ block fileOperations:
const subDir2 = dname/"sub2"
const brokenSymlinkName = "D20210101T191320_BROKEN_SYMLINK"
const brokenSymlink = dname/brokenSymlinkName
const brokenSymlinkSrc = "D20210101T191320_nonexistant"
const brokenSymlinkSrc = "D20210101T191320_nonexistent"
const brokenSymlinkCopy = brokenSymlink & "_COPY"
const brokenSymlinkInSubDir = subDir/brokenSymlinkName
const brokenSymlinkInSubDir2 = subDir2/brokenSymlinkName
@@ -296,9 +296,9 @@ block walkDirRec:
block: # walkDir
doAssertRaises(OSError):
for a in walkDir("nonexistant", checkDir = true): discard
for a in walkDir("nonexistent", checkDir = true): discard
doAssertRaises(OSError):
for p in walkDirRec("nonexistant", checkDir = true): discard
for p in walkDirRec("nonexistent", checkDir = true): discard
when not defined(windows):
block walkDirRelative:

View File

@@ -272,10 +272,10 @@ else: # main driver
stripLineEnd(result[0])
doAssert result == ("12", 0)
when not defined(windows):
doAssert execCmdEx("ls --nonexistant").exitCode != 0
doAssert execCmdEx("ls --nonexistent").exitCode != 0
when false:
# bug: on windows, this raises; on posix, passes
doAssert execCmdEx("nonexistant").exitCode != 0
doAssert execCmdEx("nonexistent").exitCode != 0
when defined(posix):
doAssert execCmdEx("echo $FO", env = newStringTable({"FO": "B"})) == ("B\n", 0)
doAssert execCmdEx("echo $PWD", workingDir = "/") == ("/\n", 0)

View File

@@ -142,7 +142,7 @@ suite "YAML syntax highlighting":
test "Directives: warnings":
let input = dedent"""
.. non-existant-warning: Paragraph.
.. non-existent-warning: Paragraph.
.. another.wrong:warning::: Paragraph.
"""
@@ -151,7 +151,7 @@ suite "YAML syntax highlighting":
check output == ""
doAssert warnings[].len == 2
check "(1, 24) Warning: RST style:" in warnings[0]
check "double colon :: may be missing at end of 'non-existant-warning'" in warnings[0]
check "double colon :: may be missing at end of 'non-existent-warning'" in warnings[0]
check "(3, 25) Warning: RST style:" in warnings[1]
check "RST style: too many colons for a directive (should be ::)" in warnings[1]