From 0e3ea1655441036aa13d95ca1c47d9d27e0dff62 Mon Sep 17 00:00:00 2001 From: flywind Date: Sun, 7 Mar 2021 19:08:41 +0800 Subject: use lowercase --define switches (#17283) --- tests/manyloc/keineschweine/dependencies/enet/enet.nim | 4 ++-- tests/manyloc/keineschweine/lib/glut.nim | 2 +- tests/niminaction/Chapter8/sdl/sdl.nim | 6 +++--- tests/stdlib/tos.nim | 4 ++-- tests/stdlib/tosprocterminate.nim | 2 +- tests/template/tmodulealias.nim | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/manyloc/keineschweine/dependencies/enet/enet.nim b/tests/manyloc/keineschweine/dependencies/enet/enet.nim index 02ebef595..5dee6ae9c 100644 --- a/tests/manyloc/keineschweine/dependencies/enet/enet.nim +++ b/tests/manyloc/keineschweine/dependencies/enet/enet.nim @@ -265,7 +265,7 @@ const ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000 ENET_PEER_FREE_RELIABLE_WINDOWS = 8 -when defined(Linux) or true: +when defined(linux) or true: import posix const ENET_SOCKET_NULL*: cint = -1 @@ -295,7 +295,7 @@ when defined(Linux) or true: template ENET_SOCKETSET_CHECK*(sockset, socket: untyped): untyped = FD_ISSET(socket, addr((sockset))) -when defined(Windows): +when defined(windows): ## put the content of win32.h in here diff --git a/tests/manyloc/keineschweine/lib/glut.nim b/tests/manyloc/keineschweine/lib/glut.nim index 44a290728..de9a97456 100644 --- a/tests/manyloc/keineschweine/lib/glut.nim +++ b/tests/manyloc/keineschweine/lib/glut.nim @@ -93,7 +93,7 @@ const GLUT_NORMAL* = 0 GLUT_OVERLAY* = 1 -when defined(Windows): +when defined(windows): const # Stroke font constants (use these in GLUT program). GLUT_STROKE_ROMAN* = cast[Pointer](0) GLUT_STROKE_MONO_ROMAN* = cast[Pointer](1) # Bitmap font constants (use these in GLUT program). diff --git a/tests/niminaction/Chapter8/sdl/sdl.nim b/tests/niminaction/Chapter8/sdl/sdl.nim index 7ba154cae..212f7b022 100644 --- a/tests/niminaction/Chapter8/sdl/sdl.nim +++ b/tests/niminaction/Chapter8/sdl/sdl.nim @@ -1,8 +1,8 @@ -when defined(Windows): +when defined(windows): const libName* = "SDL2.dll" -elif defined(Linux) or defined(freebsd) or defined(netbsd): +elif defined(linux) or defined(freebsd) or defined(netbsd): const libName* = "libSDL2.so" -elif defined(MacOsX): +elif defined(macosx): const libName* = "libSDL2.dylib" elif defined(openbsd): const libName* = "libSDL2.so.0.6" diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim index cf6fa20fa..db64f6254 100644 --- a/tests/stdlib/tos.nim +++ b/tests/stdlib/tos.nim @@ -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, diff --git a/tests/stdlib/tosprocterminate.nim b/tests/stdlib/tosprocterminate.nim index c02e0a8da..8e9041b81 100644 --- a/tests/stdlib/tosprocterminate.nim +++ b/tests/stdlib/tosprocterminate.nim @@ -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" diff --git a/tests/template/tmodulealias.nim b/tests/template/tmodulealias.nim index 6681379fb..79b5ec9c6 100644 --- a/tests/template/tmodulealias.nim +++ b/tests/template/tmodulealias.nim @@ -7,7 +7,7 @@ when defined(windows): else: import posix -when defined(Windows): +when defined(windows): template orig: expr = winlean else: -- cgit 1.4.1-2-gfad0