-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2debc71
commit 8ffc5bb
Showing
8 changed files
with
71 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
when defined(cpp): | ||
{.push header: "<vector>".} | ||
type | ||
Vector[T] {.importcpp: "std::vector".} = object | ||
elif defined(js): | ||
proc endsWith*(s, suffix: cstring): bool {.noSideEffect,importjs: "#.endsWith(#)".} | ||
elif defined(c): | ||
proc c_printf*(frmt: cstring): cint {. | ||
importc: "printf", header: "<stdio.h>", varargs, discardable.} | ||
|
||
proc main*() = | ||
runnableExamples: | ||
import std/compilesettings | ||
doAssert not defined(m13129Foo1) | ||
doAssert defined(m13129Foo2) | ||
doAssert not defined(nimdoc) | ||
echo "ok2: backend: " & querySetting(backend) | ||
# echo defined(c), defined(js), | ||
|
||
import std/compilesettings | ||
when defined nimdoc: | ||
# import std/compilesettings | ||
static: | ||
doAssert defined(m13129Foo1) | ||
doAssert not defined(m13129Foo2) | ||
echo "ok1:" & querySetting(backend) | ||
|
||
when isMainModule: | ||
when not defined(js): | ||
import std/os | ||
let cache = querySetting(nimcacheDir) | ||
doAssert cache.len > 0 | ||
let app = getAppFilename() | ||
doAssert app.isRelativeTo(cache) | ||
doAssert querySetting(projectFull) == currentSourcePath | ||
echo "ok3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
the html validation is tested by nimdoc/tester.nim | ||
the runnableExamples + nim doc logic (across backend) is tested here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ static: | |
|
||
doAssert "myNimCache" in nc | ||
doAssert "myNimblePath" in np[0] | ||
doAssert querySetting(backend) == "c" |