summary refs log tree commit diff stats
path: root/tests/stdlib/tos.nim
Commit message (Collapse)AuthorAgeFilesLines
* followup #17398: `getTempDir`, `getConfigDir` now do not have trailing ↵Timothee Cour2021-03-181-3/+3
| | | | | | | DirSep (#17402) * followup #17398: `getTempDir`, `getConfigDir` now do not have trailing DirSep * fix test
* stdlib/os: add isAdmin (#17012)Roman Inflianskas2021-03-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | * stdlib/os: add isAdmin * uint8 -> cuchar, assert isAdmin on Azure Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/pure/os.nim docs Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments on #17012 * Raise on errors in #17012 * Check the result of FreeSid in #17012 * Change case in #17012 * Fix memory leak in #17012 * Address comments in #17012 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* use lowercase --define switches (#17283)flywind2021-03-071-2/+2
|
* https://github.com/nim-lang/Nim/pull/15826/files#r585368355 (#17233)Juan Carlos2021-03-031-1/+5
|
* stdlib/os: handle symlinks in copy/move functions (#16709)Roman Inflianskas2021-02-041-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | * stdlib/os: handle symlinks in copy/move functions - Added optional `options` argument to `copyFile`, `copyFileToDir`, and `copyFileWithPermissions`. By default, symlinks are followed (copy files symlinks point to). - `copyDir` and `copyDirWithPermissions` copy symlinks as symlinks (instead of skipping them as it was before). - `moveFile` and `moveDir` move symlinks as symlinks (instead of skipping them sometimes as it was before). - Added optional `followSymlinks` argument to `setFilePermissions`. See also: https://github.com/nim-lang/RFCs/issues/319 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments in #16709 Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Address comments in #16709 (second iteration) Skip symlinks on Windows. Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* 2.5x- 3x faster copyFile on osx (#16883)Timothee Cour2021-02-011-9/+14
|
* use doAssert in tests (#16486)flywind2020-12-281-8/+8
|
* os: add overload copyFile*(source, dest: string, isDir = false) (#15537)Timothee Cour2020-10-111-0/+19
| | | | | * os: add overload copyFile*(source, dest: string, isDir = false) * renamed to copyFileToDir
* normalizeExe (#14668)Timothee Cour2020-06-151-0/+10
|
* remove isMainModule from json,os,sequtils (#14572)Timothee Cour2020-06-061-0/+63
| | | | | * move json.isMainModule => tjson * move isMainModule => tos,tsequtils
* fix #13222: make relativePath more robust and flexible (#13451)Timothee Cour2020-04-211-0/+3
| | | | | | | | | * * relativePath(foo) now works * relativePath(rel, abs) and relativePath(abs, rel) now work (fixes #13222) * relativePath, absolutePath, getCurrentDir now available in more targets (eg: vm, nodejs etc) * fix bug: isAbsolutePath now works with -d:js; add tests * workaround https://github.com/nim-lang/Nim/issues/13469 * remove `relativePath(path)` overload for now * add back changelog after rebase
* [RFC] 'walkDir' now has a new 'checkDir' flag, to mimic behaviour of other ↵Timothee Cour2020-03-201-7/+13
| | | | | languages (#13642) Co-authored-by: narimiran
* fix #13579 joinPath("/foo/", "../a") is now /a (#13586)Andreas Rumpf2020-03-051-0/+13
|
* fix #13455 ; joinPath(a,b) now honors trailing slashes in b (or a if b = "") ↵Timothee Cour2020-02-261-3/+26
| | | | | | | (#13467) * fix #13455 ; joinPath(a,b) now honors trailing slashes in b (or a if b = "") * fix test windows
* fix 3 minor bugs in joinPath (see #13455) (#13462) [backport]Andrey Makarov2020-02-231-0/+4
|
* relativePath("foo", "foo") is now ".", not "" (#13452)Timothee Cour2020-02-221-4/+8
|
* fix lots of bugs with parentDir, refs #8734 (#13236)Timothee Cour2020-01-231-5/+5
|
* new os.isRelativeTo (#13212)Timothee Cour2020-01-231-0/+12
|
* fix #13211 relativePath("foo", ".") (#13213)Timothee Cour2020-01-211-0/+4
|
* On windows, os.relativePath returns path as is when roots are different (#12329)Tomohiro2019-10-071-0/+15
| | | | | | | * On windows, os.relativePath returns path as is when roots are different * Implement os.sameRoot without windows API * Fix compile error when compiling lib/nimhcr.nim * Fix compile error when compiling lib/nimhcr.nim on Windows
* Fix how `relativePath` handle case sensitiviy (#12312) [backport]Tomohiro2019-10-011-0/+4
|
* Fixes splitfile (#11918) [bugfix]pgkos2019-08-151-0/+1
|
* [feature] Added os.delEnv; add delEnv support to nimscript too (#11466)Kaushal Modi2019-06-151-0/+13
| | | [feature] Fixes https://github.com/nim-lang/Nim/issues/11452.
* Use TMPDIR env var if available to get the temp dir name (#11443) [bugfix]Kaushal Modi2019-06-101-0/+12
| | | | | | Additionally, use normalizePathEnd to suffix the dir name with "/" or "\" as appropriate for the current OS. Fixes https://github.com/nim-lang/Nim/issues/11439.
* move tests from `tospaths` to `tos`, fixes #9671narimiran2019-01-231-43/+111
| | | | Also, change some of `echo`s to `doAssert`.
* fixes #10273 execShellCmd now returns nonzero when child killed with signal ↵Timothee Cour2019-01-131-0/+2
| | | | | | | | | | + other fixes (#10274) * s/exitStatus(...)/exitStatusLikeShell(...)/ * fix #10273 execShellCmd now returns nonzero when child exits with signal * test case for #10249 and explanation for the bug * fix test failure * add tests/nim.cfg
* os.walkDir: correctly evaluate paths when relative = true (#10057) [backport]alaviss2018-12-211-0/+8
|
* fix test failureTimothee Cour2018-12-191-0/+1
|
* fix #8255 numerous issues with splitFileTimothee Cour2018-12-191-0/+15
|
* [os] fix #10017 regression, fix #10025 regression (#10018)Timothee Cour2018-12-181-2/+5
| | | | | * [os] fix #10017 regression * [os] fix #10025 regression
* os.nim: use the new pathnorm.normalizePath implementationAraq2018-12-141-55/+26
|
* Add `relative` parameter to walkDirRecOscar Nihlgård2018-11-261-0/+19
|
* fix #8225 os.isHidden was buggy on posix (#8315)Timothee Cour2018-10-151-94/+113
| | | | | | * fix #8225 isHidden was broken on posix * scope rest of tos.nim under blocks to avoid variable scope bugs
* os: use unlink() to remove file (#9220)alaviss2018-10-091-0/+9
| | | | | removeFile() behavior should now be consistant between Windows and POSIX Fixes #9200
* Fix #9126: use splitPath instead of substrYasuhiro Horimoto2018-09-301-0/+14
|
* fix wrong arch defined(osx) (#8492)Timothee Cour2018-08-021-1/+1
|
* Add normalizePath and testsFederico Ceratto2018-07-061-0/+62
|
* make test green for OSXAndreas Rumpf2018-07-061-2/+5
|
* Use higher time resolution when available in os.nim (#7709)Oscar Nihlgård2018-06-041-0/+10
|
* add copyDir stdlib testAndreas Rumpf2017-01-101-0/+18
|
* make tos.nim green on WindowsAraq2016-12-131-4/+7
|
* Improve as previously discussedDmitry Polienko2016-10-221-0/+10
| | | | Better name for exposed primitive function, checks for pre-existing files
* Revert createDir signature, expose rawCreateDirDmitry Polienko2016-10-221-7/+0
|
* Make createDir return discardable boolDmitry Polienko2016-10-221-0/+19
|
* Add os tests for directory creation, iteration and deletionJoey Payne2016-06-201-8/+84
|
* tests: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-2/+2
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* Changed tests and tools to use 'discard' statements instead of 'nil' for ↵Clay Sweetser2014-02-151-1/+1
| | | | empty blocks.
* new tester; all tests categorizedAraq2014-01-131-0/+12