summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-05-01 15:26:41 -0700
committerGitHub <noreply@github.com>2021-05-02 00:26:41 +0200
commit78e2d299dffc9508430778fcff1dcaee2c8d39fd (patch)
tree52db85ea15ac9d502c4fd601afcec5b9183ea402
parent13b57524d35a18df57bec2a7d6a2faa7ce712e9f (diff)
downloadNim-78e2d299dffc9508430778fcff1dcaee2c8d39fd.tar.gz
typo: nonexistant => nonexistent (#17918)
* typo: nonexistant => nonexistent

* fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
-rw-r--r--lib/pure/osproc.nim2
-rw-r--r--lib/pure/sugar.nim2
-rw-r--r--nimdoc/testproject/expected/testproject.html14
-rw-r--r--nimdoc/testproject/expected/testproject.idx2
-rw-r--r--nimdoc/testproject/expected/theindex.html4
-rw-r--r--nimdoc/testproject/testproject.nim2
-rw-r--r--tests/generics/t13525.nim8
-rw-r--r--tests/importalls/mt6.nim2
-rw-r--r--tests/lexer/tcustom_numeric_literals.nim4
-rw-r--r--tests/nimdoc/trunnableexamples.nim4
-rw-r--r--tests/stdlib/tos.nim8
-rw-r--r--tests/stdlib/tosproc.nim4
-rw-r--r--tests/stdlib/trstgen.nim4
-rw-r--r--tests/typerel/tvoid.nim2
-rw-r--r--tests/types/titerable.nim10
-rw-r--r--tests/vm/tvmops.nim4
16 files changed, 38 insertions, 38 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 6aefb8d6c..1ac37661b 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -1595,7 +1595,7 @@ proc execCmdEx*(command: string, options: set[ProcessOption] = {
   ##   import std/[strutils, strtabs]
   ##   stripLineEnd(result[0]) ## portable way to remove trailing newline, if any
   ##   doAssert result == ("12", 0)
-  ##   doAssert execCmdEx("ls --nonexistant").exitCode != 0
+  ##   doAssert execCmdEx("ls --nonexistent").exitCode != 0
   ##   when defined(posix):
   ##     assert execCmdEx("echo $FO", env = newStringTable({"FO": "B"})) == ("B\n", 0)
   ##     assert execCmdEx("echo $PWD", workingDir = "/") == ("/\n", 0)
diff --git a/lib/pure/sugar.nim b/lib/pure/sugar.nim
index 9abef55a2..7cfa932e6 100644
--- a/lib/pure/sugar.nim
+++ b/lib/pure/sugar.nim
@@ -186,7 +186,7 @@ macro dumpToString*(x: untyped): string =
     assert dumpToString(a + x) == "a + x: 1 + x = 11"
     template square(x): untyped = x * x
     assert dumpToString(square(x)) == "square(x): x * x = 100"
-    assert not compiles dumpToString(1 + nonexistant)
+    assert not compiles dumpToString(1 + nonexistent)
     import std/strutils
     assert "failedAssertImpl" in dumpToString(assert true) # example with a statement
   result = newCall(bindSym"dumpToStringImpl")
diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html
index 1ea9e172a..70c5b695a 100644
--- a/nimdoc/testproject/expected/testproject.html
+++ b/nimdoc/testproject/expected/testproject.html
@@ -211,6 +211,11 @@ window.addEventListener('DOMContentLoaded', main);
     title="z11()">z11()</a></li>
 
   </ul>
+  <ul class="simple nested-toc-section">c_nonexistent
+      <li><a class="reference" href="#c_nonexistent%2Ccstring"
+    title="c_nonexistent(frmt: cstring): cint">c_nonexistent(frmt: cstring): cint</a></li>
+
+  </ul>
   <ul class="simple nested-toc-section">buzz
       <li><a class="reference" href="#buzz%2CT%2CT"
     title="buzz[T](a, b: T): T">buzz[T](a, b: T): T</a></li>
@@ -293,11 +298,6 @@ window.addEventListener('DOMContentLoaded', main);
     title="asyncFun2(): owned(Future[void])">asyncFun2(): owned(Future[void])</a></li>
 
   </ul>
-  <ul class="simple nested-toc-section">c_nonexistant
-      <li><a class="reference" href="#c_nonexistant%2Ccstring"
-    title="c_nonexistant(frmt: cstring): cint">c_nonexistant(frmt: cstring): cint</a></li>
-
-  </ul>
   <ul class="simple nested-toc-section">asyncFun1
       <li><a class="reference" href="#asyncFun1"
     title="asyncFun1(): Future[int]">asyncFun1(): Future[int]</a></li>
@@ -753,8 +753,8 @@ Some proc
 the c printf. etc.
 
 </dd>
-<a id="c_nonexistant,cstring"></a>
-<dt><pre><span class="Keyword">proc</span> <a href="#c_nonexistant%2Ccstring"><span class="Identifier">c_nonexistant</span></a><span class="Other">(</span><span class="Identifier">frmt</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;nonexistant&quot;</span><span class="Other">,</span>
+<a id="c_nonexistent,cstring"></a>
+<dt><pre><span class="Keyword">proc</span> <a href="#c_nonexistent%2Ccstring"><span class="Identifier">c_nonexistent</span></a><span class="Other">(</span><span class="Identifier">frmt</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;nonexistent&quot;</span><span class="Other">,</span>
     <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">&quot;&lt;stdio.h&gt;&quot;</span><span class="Other">,</span> <span class="Identifier">varargs</span><span class="Other">,</span> <span class="Identifier">discardable</span>.}</pre></dt>
 <dd>
 
diff --git a/nimdoc/testproject/expected/testproject.idx b/nimdoc/testproject/expected/testproject.idx
index 1d8be99da..a8cdc3be2 100644
--- a/nimdoc/testproject/expected/testproject.idx
+++ b/nimdoc/testproject/expected/testproject.idx
@@ -35,7 +35,7 @@ z17	testproject.html#z17	testproject: z17()
 p1	testproject.html#p1	testproject: p1()	
 addfBug14485	testproject.html#addfBug14485	testproject: addfBug14485()	
 c_printf	testproject.html#c_printf,cstring	testproject: c_printf(frmt: cstring): cint	
-c_nonexistant	testproject.html#c_nonexistant,cstring	testproject: c_nonexistant(frmt: cstring): cint	
+c_nonexistent	testproject.html#c_nonexistent,cstring	testproject: c_nonexistent(frmt: cstring): cint	
 low	testproject.html#low,T	testproject: low[T: Ordinal | enum | range](x: T): T	
 low2	testproject.html#low2,T	testproject: low2[T: Ordinal | enum | range](x: T): T	
 tripleStrLitTest	testproject.html#tripleStrLitTest	testproject: tripleStrLitTest()	
diff --git a/nimdoc/testproject/expected/theindex.html b/nimdoc/testproject/expected/theindex.html
index 81370d115..e6efee986 100644
--- a/nimdoc/testproject/expected/theindex.html
+++ b/nimdoc/testproject/expected/theindex.html
@@ -142,9 +142,9 @@ window.addEventListener('DOMContentLoaded', main);
 <li><a class="reference external"
           data-doc-search-tag="Shapes.Circle" href="testproject.html#Circle">Shapes.Circle</a></li>
           </ul></dd>
-<dt><a name="c_nonexistant" href="#c_nonexistant"><span>c_nonexistant:</span></a></dt><dd><ul class="simple">
+<dt><a name="c_nonexistent" href="#c_nonexistent"><span>c_nonexistent:</span></a></dt><dd><ul class="simple">
 <li><a class="reference external"
-          data-doc-search-tag="testproject: c_nonexistant(frmt: cstring): cint" href="testproject.html#c_nonexistant%2Ccstring">testproject: c_nonexistant(frmt: cstring): cint</a></li>
+          data-doc-search-tag="testproject: c_nonexistent(frmt: cstring): cint" href="testproject.html#c_nonexistent%2Ccstring">testproject: c_nonexistent(frmt: cstring): cint</a></li>
           </ul></dd>
 <dt><a name="c_printf" href="#c_printf"><span>c_printf:</span></a></dt><dd><ul class="simple">
 <li><a class="reference external"
diff --git a/nimdoc/testproject/testproject.nim b/nimdoc/testproject/testproject.nim
index c7a1cd0fc..d435efa66 100644
--- a/nimdoc/testproject/testproject.nim
+++ b/nimdoc/testproject/testproject.nim
@@ -185,7 +185,7 @@ when true: # procs without `=` (using comment field)
     ## the c printf.
     ## etc.
 
-  proc c_nonexistant*(frmt: cstring): cint {.importc: "nonexistant", header: "<stdio.h>", varargs, discardable.}
+  proc c_nonexistent*(frmt: cstring): cint {.importc: "nonexistent", header: "<stdio.h>", varargs, discardable.}
 
 when true: # tests RST inside comments
   proc low*[T: Ordinal|enum|range](x: T): T {.magic: "Low", noSideEffect.}
diff --git a/tests/generics/t13525.nim b/tests/generics/t13525.nim
index d1b8df78c..1fd84852b 100644
--- a/tests/generics/t13525.nim
+++ b/tests/generics/t13525.nim
@@ -1,6 +1,6 @@
 # https://github.com/nim-lang/Nim/issues/13524
 template fun(field): untyped = astToStr(field)
-proc test1(): string = fun(nonexistant1)
-proc test2[T](): string = fun(nonexistant2) # used to cause: Error: undeclared identifier: 'nonexistant2'
-doAssert test1() == "nonexistant1"
-doAssert test2[int]() == "nonexistant2"
+proc test1(): string = fun(nonexistent1)
+proc test2[T](): string = fun(nonexistent2) # used to cause: Error: undeclared identifier: 'nonexistent2'
+doAssert test1() == "nonexistent1"
+doAssert test2[int]() == "nonexistent2"
diff --git a/tests/importalls/mt6.nim b/tests/importalls/mt6.nim
index c6d8b2193..ac6f542b6 100644
--- a/tests/importalls/mt6.nim
+++ b/tests/importalls/mt6.nim
@@ -6,7 +6,7 @@ doAssert declared(m2.foo0) # public: works fine
 
 doAssert m2.foo1 == 2
 doAssert declared(m2.foo1)
-doAssert not declared(m2.nonexistant)
+doAssert not declared(m2.nonexistent)
 
 # also tests the quoted `""` import
 import "."/"m1" {.all.} as m1b
diff --git a/tests/lexer/tcustom_numeric_literals.nim b/tests/lexer/tcustom_numeric_literals.nim
index 17933950a..9c49d0c08 100644
--- a/tests/lexer/tcustom_numeric_literals.nim
+++ b/tests/lexer/tcustom_numeric_literals.nim
@@ -136,8 +136,8 @@ template main =
     macro deb1(a): untyped = newLit a.repr
     macro deb2(a): untyped = newLit a.lispRepr
     doAssert deb1(-12'wrap) == "-12'wrap"
-    doAssert deb1(-12'nonexistant) == "-12'nonexistant"
-    doAssert deb2(-12'nonexistant) == """(DotExpr (RStrLit "-12") (Ident "\'nonexistant"))"""
+    doAssert deb1(-12'nonexistent) == "-12'nonexistent"
+    doAssert deb2(-12'nonexistent) == """(DotExpr (RStrLit "-12") (Ident "\'nonexistent"))"""
     when false: # xxx bug:
       # this holds:
       doAssert deb2(-12.wrap2) == """(DotExpr (IntLit -12) (Sym "wrap2"))"""
diff --git a/tests/nimdoc/trunnableexamples.nim b/tests/nimdoc/trunnableexamples.nim
index 2de1862bd..bc5ea0e5e 100644
--- a/tests/nimdoc/trunnableexamples.nim
+++ b/tests/nimdoc/trunnableexamples.nim
@@ -93,7 +93,7 @@ when true: # runnableExamples with rdoccmd
 
   template fun3Impl(): untyped =
     runnableExamples(rdoccmd="-d:foo"):
-      nonexistant
+      nonexistent
         # bugfix: this shouldn't be semchecked when `runnableExamples`
         # has more than 1 argument
     discard
@@ -126,7 +126,7 @@ runnableExamples:
 
   block:
     template fn(body: untyped): untyped = true
-    doAssert(fn do: nonexistant)
+    doAssert(fn do: nonexistent)
   import std/macros
   macro foo*(x, y) =
     result = newLetStmt(x[0][0], x[0][1])
diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim
index 3f62a098f..1fcee5a2e 100644
--- a/tests/stdlib/tos.nim
+++ b/tests/stdlib/tos.nim
@@ -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:
diff --git a/tests/stdlib/tosproc.nim b/tests/stdlib/tosproc.nim
index 67731322a..d767aac80 100644
--- a/tests/stdlib/tosproc.nim
+++ b/tests/stdlib/tosproc.nim
@@ -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)
diff --git a/tests/stdlib/trstgen.nim b/tests/stdlib/trstgen.nim
index cbdb23cd6..667fec780 100644
--- a/tests/stdlib/trstgen.nim
+++ b/tests/stdlib/trstgen.nim
@@ -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]
 
diff --git a/tests/typerel/tvoid.nim b/tests/typerel/tvoid.nim
index 0b7b525cc..8bb5691b8 100644
--- a/tests/typerel/tvoid.nim
+++ b/tests/typerel/tvoid.nim
@@ -94,5 +94,5 @@ block: # typeof(stmt)
     doAssert not compiles(bad1())
 
   block:
-    template bad2 = echo (nonexistant; discard)
+    template bad2 = echo (nonexistent; discard)
     doAssert not compiles(bad2())
diff --git a/tests/types/titerable.nim b/tests/types/titerable.nim
index b0713961d..fe27de4fd 100644
--- a/tests/types/titerable.nim
+++ b/tests/types/titerable.nim
@@ -119,11 +119,11 @@ template main() =
 
   block:
     # shows that iterable is more restrictive than untyped
-    reject fn8a(nonexistant)
-    accept fn7b(nonexistant)
-    reject fn7c(nonexistant)
-    reject fn7d(nonexistant)
-    reject fn7e(nonexistant)
+    reject fn8a(nonexistent)
+    accept fn7b(nonexistent)
+    reject fn7c(nonexistent)
+    reject fn7d(nonexistent)
+    reject fn7e(nonexistent)
 
   doAssert toSeq5(iota(3)) == expected1
   reject toSeq5(myiter(2))
diff --git a/tests/vm/tvmops.nim b/tests/vm/tvmops.nim
index 632dcbee7..3d8d5a9ac 100644
--- a/tests/vm/tvmops.nim
+++ b/tests/vm/tvmops.nim
@@ -16,7 +16,7 @@ static:
     let ret = gorgeEx(nim & " --version")
     doAssert ret.exitCode == 0
     doAssert ret.output.contains "Nim Compiler"
-    let ret2 = gorgeEx(nim & " --unexistant")
+    let ret2 = gorgeEx(nim & " --nonxistent")
     doAssert ret2.exitCode != 0
     let output3 = gorge(nim & " --version")
     doAssert output3.contains "Nim Compiler"
@@ -43,4 +43,4 @@ block:
   # Check against bugs like #9176
   doAssert getCurrentCompilerExe() == getCurrentCompilerExe().static
   if false: #pending #9176
-    doAssert gorgeEx("unexistant") == gorgeEx("unexistant").static
+    doAssert gorgeEx("nonxistent") == gorgeEx("nonxistent").static