summary refs log tree commit diff stats
path: root/tests/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* add testcase for #9754flywind2020-11-131-0/+2
|
* add testcaseflywind2020-11-121-0/+25
|
* `ioutils` are moved to `fusion` (#15822)Miran2020-11-021-49/+0
|
* Handle BLOB column type in SQLite as binary data (#15681)Regis Caillaud2020-11-021-0/+50
| | | | | | * Fixed not handling blob correctly in sqlite * Fixed setLen commented by mistake * Added binary example as db_sqlite doc * Added tests for sqlite binary data
* fix #15815 (#15817)flywind2020-11-021-0/+16
|
* add testcase for #9091 (#15791)flywind2020-10-301-0/+36
| | | | | * add testcase for #9091 * more tests
* add tests for #7686 (#15771)flywind2020-10-291-0/+9
|
* fixes #15413 (#15768)Andreas Rumpf2020-10-291-0/+3
| | | | | | | * fixes #15413 * better hide it properly * see if this makes our list of important packages happy
* fixes #10456,#12928 issues when chaining templates to sortedByIt (#15734)shirleyquirk2020-10-271-0/+18
| | | | | | | | | | | | | | | * update c_malloc's to csize_t fix for broken --os:ios * I'm an idiot sorry * Create talgorithm.nim * workaround for #10456 I don't understand the intricacies of how lambdalifting and template expansions interact with lent, so i don't know how to fix the real problem, but this sidesteps whatever issue that is. * working test, use typeof rather than auto
* Add C function dup and dup2 posix to system/io (#15675)Regis Caillaud2020-10-271-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | * * Add handle to dup and dup2 posix as duplicate and duplicateTo in std/ioutils. * Added small test & changelog entry * Fixed import in tioutils removed when isMainModule * * Nest test inside block. Rename proc var -> let in captureStdout * Renamed tmpfile to iotuils.txt * Added block: # duplicate, duplicateTo * Improved docstring * Clean non-idiomatic code * Added runnable examples * rm 2 trailing space in expected output * Made syntax prettier * Runnable example: file in getTempDir() * Tmp -> Temp * Fixed runnableExamples on windows
* workaround #15713 disable freebsd tssl.nim (#15718)Timothee Cour2020-10-261-1/+3
|
* Fix #12410 (#15685)Clyybber2020-10-231-0/+13
| | | | | * Fix #12410, big thanks to @pmetras for this fix * Add testcase
* add tests for #15584 (#15619)n5m2020-10-182-0/+27
| | | | | | | | | | | | | | | | | * add test for #15584 * Rename userlocks.nim to trlocks.nim * add bug comment * improve cmd * reference bugfix, not bug * add test that runs rlocks * disallow joining joining with other test cases (e.g., a test case that invokes `RLock.initRLock()`) may cause this test to compile, when the goal is to test if these lines can be compiled in isolation
* terminal: fix fgColor/bgColor commands [backport] (#15554)alaviss2020-10-131-0/+8
| | | | | Since #8296, fgSetColor is no longer a global. These commands were probably left out from the change as an oversight, so some tests have been added to make sure this won't happen again.
* 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
* Fix #15493 - disable TLS emulation for NetBSD (#15494)Euan2020-10-051-2/+2
| | | TLS emulation was already disabled for FreeBSD due to the same issue.
* Fix #15452 - ip protocol not defined on NetBSD (#15453)Euan2020-10-011-1/+4
|
* fix #15333 (#15336)flywind2020-09-241-0/+17
|
* Add strutils.indentation and make unindent use it (#15264)Clyybber2020-09-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | * Add strutils.indentation and make unindent use it * Code style * Fix bootstrapping * Improve wording * Fix test * Introduce without breaking change * Fix * Reduce diff * Fix docs link * Add since annotation * Update changelog
* add testcase for #9710 (#15365)flywind2020-09-211-0/+11
| | | | | * string is not nil anymore * tatus
* fixes #15369 (#15371)Andreas Rumpf2020-09-201-0/+14
|
* allow old styled RTTI for arc/orc (#15331)Andreas Rumpf2020-09-161-3/+3
|
* test cookies with comma for #15319 (#15322)flywind2020-09-141-0/+17
| | | | | * test cookies with comma for #15319 * space
* Fixing issue #15302 -- lwip doesn't support signals (#15303)Jaremy Creechley2020-09-141-0/+30
| | | | | | | | * Fixing issue #15302 -- lwip doesn't support signals * Adding test to catch issue #15302 -- lwip/freertos net library don't try to build / run on windows, it'll compile only but not run Fixing issue #15302 -- reworking test to compile on other platforms
* Add some enhancements to `jsonutils.nim` (#15133)Ivan Bobev2020-09-091-2/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add some enhancements to `jsonutils.nim` * Use `jsonutils.nim` hookable API to add a possibility to deserialize JSON arrays directly to `HashSet` and `OrderedSet` types and respectively to serialize those types to JSON arrays. * Also add a possibility to deserialize JSON `null` objects to Nim option objects and respectively to serialize Nim option object to JSON object if some or to JSON `null` object if none. * Move serialization/deserialization functionality for `Table` and `OrderedTable` types from `jsonutils.nim` to `tables.nim` via the hookable API. * Add object `jsonutils.Joptions` and parameter from its type to `jsonutils.fromJson` procedure to control whether to allow deserializing JSON objects to Nim objects when the JSON has some extra or missing keys. * Add unit tests for the added functionalities to `tjsonutils.nim`. * improve fromJsonFields * Add changelog entry for the jsonutils enhancements * Add TODO in `jsonutils.nim` * Added an entry to "Future directions" section in `jsonutils.nim` as suggestion for future support of serialization and de-serialization of nested variant objects. * Added currently disabled test case in `tjsonutils.nim` for testing serialization and de-serialization of nested variant objects. * Move JSON hooks to `jsonutils.nim` Move `fromJsonHook` and `toJsonHook` procedures for different types to `jsonutils.nim` module to avoid a dependency of collections modules to the `json.nim` module. The hooks are removed from the following modules: * `tables.nim` * `sets.nim` * `options.nim` * `strtabs.nim` * Add some tests about `StringTableRef` Add tests for `StringTableRef`'s `fromJsonHook` and `toJsonHook` to `tjsonutils.nim`. * Disable a warning in `jsonutils.nim` Mark `fun` template in `jsonutils` module with `{.used.}` pragma in order to disable `[XDeclaredButNotUsed]` hint. The template is actually used by the `initCaseObject` macro in the same module. Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* add getprotobyname (#15273)flywind2020-09-091-0/+25
| | | | | | | * add getprotobyname * tests, docs, changelog * add since
* more Protocol supports in windows (#15274) [backport:1.2]flywind2020-09-071-0/+29
|
* fix #15257, `toHex` couldn't handle large uint64 (#15261) [backport:1.2]Miran2020-09-041-2/+4
|
* [backport] fix #15064, strscans.scanf edge case for '$+' (#15223)Miran2020-08-251-1/+15
|
* Add test coverage for atomics (#15193)Elijah Shaw-Rutschman2020-08-181-0/+609
| | | | | | | | | | | | | | | * Add test coverage for atomics Signed-off-by: Elijah Shaw-Rutschman <elijahr@gmail.com> * Fix compareExchange bugs for non-trivial objects Bugs fixed: 1. compareExchange would not set the desired value in the success case. 2. compareExchange would not set var expected to the found value in the failure case. 3. withLock would spin forever running the unit tests. try..body..finally prevents this. Not sure why this makes a difference, since an exception wasn’t being raised, but clearing the guard in a finally block seems correct anyways. Signed-off-by: Elijah Shaw-Rutschman <elijahr@gmail.com>
* [FIX] strtabs interpolation in nimscript (#15172)haxscramper2020-08-091-0/+5
| | | | | * [FIX] strtabs interpolation in nimscript * [TEST] Use `static` in strtabs test
* net: allow close() to ignore SSL failures due to disconnections (#15120)alaviss2020-08-011-7/+78
| | | | | | | | | | | | | | * net: allow close() to ignore SSL failures due to disconnections Comes with this PR is also a SIGPIPE handling contraption. * net: don't do selectSigpipe() on macOS macOS sockets have SO_NOSIGPIPE set, so an EPIPE doesn't necessary mean that a SIGPIPE happened. * net: fix alreadyBlocked logic * net: WSAESHUTDOWN is also a disconnection error
* asyncnet, net: don't attempt SSL_shutdown if a fatal error occurred (#15066)alaviss2020-07-302-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | * asyncnet, net: don't attempt SSL_shutdown if a fatal error occurred Per TLS standard and SSL_shutdown(3ssl). This should prevent errors coming from a close() after a bad event (ie. the other end of the pipe is closed before shutdown can be negotiated). Ref #9867 * tssl: try sending until an error occur * tssl: cleanup * tssl: actually run the test I forgot to make the test run :P * tssl: run the test on ARC, maybe then it'll be happy * tssl: turns off ARC, switch tlsEmulation on for freebsd * tssl: document why tlsEmulation is employed * net: move SafeDisconn handling logic to socketError
* fixes #14139 (#15107)flywind2020-07-291-0/+9
| | | | | | | * fix #14139 * Update lib/pure/collections/heapqueue.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Clyybber <darkmine956@gmail.com>
* Fix #14906 (#14949)Tomohiro2020-07-181-2/+54
| | | | | | | | | | | | | | | | | | | | | | | * Fix #14906 by wrapping outputStream with PipeOutStream * Fix compile error when ./build_all.sh * Use PipeOutStream on posix * Fix compile error when build_all.sh * Use ptr UncheckedArray * Replace copyRefObj * Remove tmp buffer from posPeekData * Add more tests for outputStream * Add comments about PipeOutStream.buffer * Fix bug in posReadLine * Move implementation of newPipeOutStream to streamwrapper module
* fix #14475; unittest.require now works with `nim c`; require and check now ↵Timothee Cour2020-07-142-1/+23
| | | | | | | | | | | | | works with -d:nodejs (#14676) * fix #14475; make unittest work with -d:nodejs * fixup * fixup * disable inim, delaunay which failed after unittest.require got fixed * re-enable tests that have been fixed
* Fix #12759 (#14967)flywind2020-07-121-0/+10
| | | | | * add testcase for #5926 * fix #12759
* add docs and more tests for debug format strings (#14861)flywind2020-07-081-3/+70
| | | | | | | | | | | | | | | | | * add debug format string * remove try except * add changelog * add docs and more tests * Update lib/pure/strformat.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> * minor Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* weaken tosproc test for my Windows machine which doesn't have 'ls'Araq2020-07-071-1/+2
|
* {.deprecated: [existsFile: fileExists].} (#14735)Timothee Cour2020-07-021-1/+1
| | | | | | | | | * {.deprecated: [existsFile: fileExists].} * s/existsFile/fileExists/ except under deps * workaround pending #14819 * fix test
* add debug fmt string like python's (#14808)flywind2020-06-301-0/+105
| | | | | | | * add debug format string * remove try except * add changelog
* testament: generic N-fold batching: windows CI 37mn=>16m (#14823)Timothee Cour2020-06-271-14/+102
| | | | | | | | | * testament: run CI faster thanks to batching * move ta_in, tstdin into existing tosproc * move ta_out,tafalse,texitcode,tstderr into existing tosproc * joinable osproc * move tstdout into existing tosproc * spec: batchable; fix tests * fixup
* fromJson: support object variants (#14694)Timothee Cour2020-06-241-0/+53
|
* [cleanups] doassert => doAssert; mark deadcode (#14711)Timothee Cour2020-06-172-8/+8
|
* Remove deprecated stuff from stdlib (#14699)Miran2020-06-172-11/+11
| | | | | | | * update to the latest Jester * remove deprecated procs from some stdlib modules * 'criterion' is not maintained anymore and relies on obsolete stuff
* `addQuitProc` now works with closures, and c, js(node/browser) backend; fix ↵Timothee Cour2020-06-161-0/+21
| | | | | | | | | | | | | | | some bugs in testament (#14342) * make addQuitProc great again * fix bugs in testament * fix test * change 2016 => 2020 * addQuitProc => addExitProc + locks * move to std/exitprocs
* make tests/stdlib tests joinable (#14626)Timothee Cour2020-06-158-7/+44
| | | | | * make tests/stdlib tests joinable * fixup
* make `fromJson/toJson` work with `array[range, typ]`, + 1 bugfix (#14669)Timothee Cour2020-06-151-0/+26
| | | | | * make toJson more robust * properly handle array
* normalizeExe (#14668)Timothee Cour2020-06-151-0/+10
|
* Disable tfdleak_multiple on platforms other than Windows (#14624)Timothee Cour2020-06-111-1/+4
|