use lowercase --define switches (#17283)

This commit is contained in:
flywind 2021-03-07 19:08:41 +08:00 • committed by GitHub
commit 0e3ea16554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 45 additions and 45 deletions

View file

@ -353,7 +353,7 @@ block absolutePath:
doAssertRaises(ValueError): discard absolutePath("a", "b")
doAssert absolutePath("a") == getCurrentDir() / "a"
doAssert absolutePath("a", "/b") == "/b" / "a"
when defined(Posix):
when defined(posix):
doAssert absolutePath("a", "/b/") == "/b" / "a"
doAssert absolutePath("a", "/b/c") == "/b/c" / "a"
doAssert absolutePath("/a", "b/") == "/a"
@ -610,7 +610,7 @@ block: # normalizePathEnd
doAssert "//".normalizePathEnd(false) == "/"
doAssert "foo.bar//".normalizePathEnd == "foo.bar"
doAssert "bar//".normalizePathEnd(trailingSep = true) == "bar/"
when defined(Windows):
when defined(windows):
doAssert r"C:\foo\\".normalizePathEnd == r"C:\foo"
doAssert r"C:\foo".normalizePathEnd(trailingSep = true) == r"C:\foo\"
# this one is controversial: we could argue for returning `D:\` instead,

View file

@ -6,7 +6,7 @@ discard """
import os, osproc, times, std / monotimes
when defined(Windows):
when defined(windows):
const ProgramWhichDoesNotEnd = "notepad"
elif defined(openbsd):
const ProgramWhichDoesNotEnd = "/bin/cat"