Commit Graph

23 Commits

Author SHA1 Message Date
Timothee Cour
f061971a9b envPairs works in vm, nims (#18615)
* envPairs works in vm, nims

* fixup
2021-09-29 09:32:39 +02:00
Tomohiro
7c8ea490a2 Fix initrand to avoid random number sequences overlapping (#18744)
* Fix initrand to avoid random number sequences overlapping

* Minor fix

* Fix compile error on js backend

* Disable new test for js backend

* Minor fix

* tempfiles module uses random.initRand()

* Remove unused module import from lib/std/tempfiles.nim

* Initialize baseState in initRand()

* Run tests/stdlib/trandom.nim from tests/test_nimscript.nims

* baseState is initialized only with sysrand.urandom and quit if failed

* Add comments
2021-09-02 14:12:14 +02:00
hlaaftana
fad8439b8d Make parseopt available on all backends (#17009)
* Make parseopt available on all backends

* fix spaces

* fix getopt and update prelude

* no crazy unnecessary version checks, use doAssert
2021-02-13 09:05:40 +01:00
Roman Inflianskas
e9b360c5df stdlib/os: handle symlinks in copy/move functions (#16709)
* 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>
2021-02-04 18:57:41 +01:00
Timothee Cour
e5db5316c2 doAssertRaises improvements; nimscript supports except Exception as e (#15765)
* doAssertRaises now correctly handles foreign exceptions; now shows which exception is raised on mismatch
* nimscript now handles `Exception as e`
* remove catch-all doAssertRaises overload from this PR

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-11-12 09:25:41 +01:00
Timothee Cour
3cbe8d2c53 $(uint|uint64) now works with nimscript (#15644)
* $(uint|uint64) now works with nimscript

* fixup
2020-10-20 14:26:37 +02:00
Timothee Cour
695154970d deprecate existsDir; use dirExists instead (#14884) 2020-07-03 23:04:23 +02:00
Timothee Cour
dc5a40f3f3 {.deprecated: [existsFile: fileExists].} (#14735)
* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
2020-07-02 16:19:13 +02:00
Timothee Cour
7ded490ec0 cleanup tests/test_nimscript.nims (#14686) 2020-06-16 14:38:30 -07:00
Timothee Cour
45cac4afda fix #14179, fix #14142, make CI 1.4x faster (2x faster locally) (#14658)
* fix #14142: no more clash with: import os + use of existsDir/dirExists/existsFile/fileExists/findExe in config.nims

* remove a comment

* Revert "fixes the regression #12860 caused; hotfix"

This reverts commit 3d2459bdc0.

* Revert "Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)"

This reverts commit d38853c504.

* noNimScript => noWeirdTarget + noNimJs
2020-06-16 08:56:12 +02:00
Araq
7bac6f5f9a don't close #14142 2020-05-02 22:31:19 +02:00
Araq
8e04ef3c0f closes #14142 2020-05-02 22:31:19 +02:00
hlaaftana
cd9af6b804 StringStream & more stdlib modules support for JS/NimScript (#14095)
* StringStream & more stdlib modules support for JS/NimScript

* change back pegs test in line with #14134
2020-04-28 19:44:52 +02:00
Timothee Cour
a43583f9c8 relativePath("foo", "foo") is now ".", not "" (#13452) 2020-02-22 09:07:53 +01:00
narimiran
da57c0ab99 remove subexes 2019-01-10 09:17:12 +01:00
Andreas Rumpf
8d850f7a69 deprecated ospaths (#9665) 2018-11-09 16:36:49 +01:00
Andreas Rumpf
abec8823aa bugfix: make 'macros' module available for nimscript 2017-11-14 23:26:46 +01:00
Ruslan Mustakov
2c146445bc Added deques module, deprecating queues 2016-11-24 19:11:51 +07:00
Araq
4f449f4e52 added file back with proper access rights (thanks for that, only took me an hour) 2016-06-07 01:21:10 +02:00
Araq
a369a98e5e remove file with broken access bits 2016-06-07 01:17:00 +02:00
Araq
6a53126671 update the version number in more places 2016-06-07 00:54:49 +02:00
Federico Ceratto
497925ab6d Disable pegs 2016-04-11 18:00:53 +01:00
Federico Ceratto
c1c3c4c5d1 Add nimscript test and run it in Travis CI 2016-04-03 13:44:26 +01:00