os: confine osErrorMsg example to Linux (#11725)
POSIX does **not** define the exact number for each errors. This caused a failure in docs building on Haiku.
This commit is contained in:
parent
cf36e4a44a
commit
a59fb5b352
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ proc osErrorMsg*(errorCode: OSErrorCode): string =
|
|||
## * `raiseOSError proc <#raiseOSError,OSErrorCode,string>`_
|
||||
## * `osLastError proc <#osLastError>`_
|
||||
runnableExamples:
|
||||
when defined(posix):
|
||||
when defined(linux):
|
||||
assert osErrorMsg(OSErrorCode(0)) == ""
|
||||
assert osErrorMsg(OSErrorCode(1)) == "Operation not permitted"
|
||||
assert osErrorMsg(OSErrorCode(2)) == "No such file or directory"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue