summary refs log tree commit diff stats
path: root/tests/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* remove unnecessary when statement (#17135)flywind2021-02-211-1/+10
|
* move prelude so that `include std/prelude` also works (#17110)Timothee Cour2021-02-201-0/+14
| | | | | * move prelude so that `include std/prelude` also works * add test
* Improve the strformat module (#17106)konsumlamm2021-02-201-512/+498
| | | | | | | | | | | | | | | | | | | | | | * Improve the strformat module Improve documentation Use runnableExamples * Fix overflow error for low(int64) Add test * Use assert in runnableExamples * Improve tstrformat Put tests in proc & test VM Put tests in blocks Add c, js targets * Use doAssert in tests * Disable JS & VM tests
* enable bsd for tsetutils; improve setutils API (#17098)Timothee Cour2021-02-201-2/+4
|
* stricter checks for RST headlines (#17089)Andrey Makarov2021-02-201-4/+20
|
* uri: document removeDotSegments, add tests, show failure modes (#17064)Timothee Cour2021-02-201-8/+1
| | | | * uri: document removeDotSegments, add tests, show failure modes * address comments
* close #13859; add testcase (#17099)flywind2021-02-191-0/+19
| | | | | | | * fix js unsigned integer * better * close #13859; add testcase
* Add setutils.complement, setutils.fullSet (#17066)Jason Beetham2021-02-181-7/+27
|
* [nodejs backend] paramStr, paramCount (#17082)flywind2021-02-181-0/+11
|
* fix math.frexp function signature (#16725)flywind2021-02-171-3/+10
|
* make system random work in VM (#17059)flywind2021-02-171-6/+29
| | | | * make system random work in VM
* Fix bug in removeDotSegments: added test (#17050)Benoit Favre2021-02-161-0/+1
| | | | | * Fix bug in removeDotSegments when path ends with dot * Add test for trailing period bug in uri
* Improve documentation for bitops (#16961)konsumlamm2021-02-151-336/+173
| | | | | | | | | | * Improve documentation for bitops Use func Use let in runnableExamples * Remove unnecessary tests Fix #7587
* RST: implement footnotes and citations (#16960)Andrey Makarov2021-02-151-0/+208
| | | | | | | | | * RST: implement footnotes and citations * manual fixup of nimdoc.out.css * remove unused code * shorter printing code * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Improve the heapqueue module (#17034)konsumlamm2021-02-151-34/+83
| | | | | | Improve documentation Optimize toHeapQueue Rename siftup and siftdown Add tests for the heap property
* Improve math module (#17019)konsumlamm2021-02-122-311/+358
| | | | | | | | | | | | | | | | | | | | | | | | | * Improve documentation for math Support empty input for cumsummed Use runnableExamples Move some examples to tests Add more tests * Update tests/stdlib/tmath.nim Move some tests to trandom.nim Move tests into main template where possible Add test for #17017 * Add more tests for gamma & lgamma Remove gamma(-1.0) example Small fixes/changes * Move more tests into template main() * Fix typos * Add edge case examples for copySign
* parse RST headings when EOF follows them (#17014)Andrey Makarov2021-02-121-0/+7
|
* add system random to stdlib: std/sysrand (#16459)flywind2021-02-111-0/+13
|
* fix #16967 [backport:1.2] (#16976)hlaaftana2021-02-091-0/+16
| | | | | * fix #16967 [backport:1.2] * move test to tsugar
* std/lists: Various changes to `lists` (RFC #303) (#16536)Peter Salvi2021-02-081-20/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Various changes to `lists` (RFC #303) * Removing a non-element is no-op; better tests * Remove preserves cycles; add appendMove alias; tests. * Return value for (singly linked) `lists.remove` * More test for lists.remove * Moved `lists.append` to the end of the file to see all `add` definitions * Disable testing js for now * Use workaround for swap js bug * Smaller diff * Undo "silent" deprecation of append * Correct typo in changelog Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Remove `appendMoved` Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Don't remove appendMoved Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* basic cleanups regarding SSL handling (#16940) [backport:1.0]Andreas Rumpf2021-02-081-1/+1
| | | | | | | * basic cleanups regarding SSL handling * enabled certificate checking on Windows * updated the SSL test * quoting helps
* close #16921 (#16951)flywind2021-02-061-0/+3
|
* 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>
* Sugar tests (#16820)konsumlamm2021-02-021-118/+215
|
* `dumpToString`: improves on `sugar.dump` (#16841)Timothee Cour2021-02-021-1/+11
| | | | | | | * dumpToString * _ * fixup * changelog * address comment: removed the word "Deprecated"
* Improve doc comments (#16902)konsumlamm2021-02-021-83/+85
| | | | | Add runnableExamples Use `reduce` in `initRational` and `//` Add static tests
* 2.5x- 3x faster copyFile on osx (#16883)Timothee Cour2021-02-011-9/+14
|
* fix #16822 (#16884)flywind2021-02-011-2/+1
| | | | | | | | | * see whether it breaks * fix #16884 * correct * fix #14574
* add lost functions (#16843)flywind2021-01-291-0/+2
|
* fix #16815 round(x,places) works again in vm (#16825)Timothee Cour2021-01-281-28/+30
| | | | | | | * fix #16815 round+places works again in vm * improve tests; fix for linux 32bit * fix test for windows
* Improve documentation for the mersenne module (#16824)konsumlamm2021-01-271-0/+11
| | | | | | | * Improve documentation for mersenne Add tests for mersenne * Add link to Wikipedia article
* Moved json enum index test to the proper file (#16826)Jason Beetham2021-01-252-11/+12
|
* added enum indexed array support to json (#16807)Jason Beetham2021-01-261-0/+11
| | | | | | | * added enum indexed array support to json * Added json test * Removed when statement for enum indexed arrays
* Improve the marshal module (#16777)konsumlamm2021-01-221-94/+85
| | | | | | | | | | * Improve marshal Use runnableExamples Refactor tests * Readd {.inheritable.} test Apply suggestions
* addQuitProc => addExitProc (#16765)Timothee Cour2021-01-221-1/+3
|
* Fix SIGSEGV in httpclient response body (#16766)Daehee2021-01-221-0/+6
| | | | | | | | | * initialize httpclient response bodyStream; prevent SIGSEGV when getBody is false * Update lib/pure/httpclient.nim * Update lib/pure/httpclient.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix noDecl => nodecl (#16760)Timothee Cour2021-01-201-0/+1
| | | | | | | * fix noDecl => nodecl * address comment * disable flaky tests/stdlib/thttpclient.nim on freebsd
* jsonutils.jsonTo: support opt (#16739)Timothee Cour2021-01-171-0/+3
|
* js: improve tests + some docs (#16727)Timothee Cour2021-01-161-0/+6
| | | | | | | | | | | * js: improve tests * _ * _ * _ * fixup
* Deprecate TaintedString (#15423)Juan Carlos2021-01-152-8/+8
| | | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* Add js BigInts (#16409)Juan Carlos2021-01-141-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | * Add BigInts * Renames tos plurals * Improve Stringifications * Update changelog.md Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> * RunnableExamplerize * discard the discardable pragma * Several improvements from peer reviews, more docs * More doc, more test * More doc, more test * Better error message 'Error: usage of low is an {.error.} defined at jsbigints.nim' instead of just 'type mismatch JsBigInt' * is an overload, rename * proc to scare kids away * Update lib/js/jsbigints.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * https://github.com/nim-lang/Nim/pull/16409#discussion_r554365041 Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Transfer-Encoding:chunked tests (#16678)vabresto2021-01-141-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add tests and fix extra newlines in body * Fixes per comments * Slight rephrase per comments * Improvements per comments * Add getSocket to reduce test flakiness per comment * Remove unused lines from header * Add doc comment to getSocket per comment * Apply witchcraft to replace `discard Future` * Return HTTP 400 on bad encoding in request * Fix runnable example for getSocket * Fix import to fix runnable examples * Even more imports for the example * Better self documenting runnable example * Add missing import * Import from module with correct signature * Resolve port type mismatch
* enable tests/stdlib/thttpclient.nim (#16710)Timothee Cour2021-01-141-5/+6
| | | | | * enable tests/stdlib/thttpclient.nim * disable windows, openbsd
* Fixes #16436 (#16695)Yuriy Glukhov2021-01-141-0/+23
| | | | | * Fixes #16436 * Comments addressed
* fix #16703; revert most of #16480; add tests/stdlib/tmimetypes.nim (#16711)Timothee Cour2021-01-131-0/+13
|
* revive PR #16320 (CRLF fix); fix #16308; Update openssl.nim (#16648)Timothee Cour2021-01-121-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update openssl.nim Fix issue # 16308 * Update openssl.nim These are also related to Issues [#16308](https://github.com/nim-lang/Nim/issues/16308) * Update openssl.nim * Add files via upload SSL PEM_read_RSAPUBKEY check * Delete topenssl_rsa_private_key.pem * Delete topenssl_rsa_public_key.pem * Delete topenssl.nim * Add files via upload * Update topenssl.nim This test makes me dizzy. Variables such as' PRSA 'must be declared in advance, otherwise they will run incorrectly. The argument uses a cString, and string also makes an error. * Update topenssl.nim ``` lhf@lhf-pc:/media/lhf/D$ cat -e ./topenssl.nim import std/wordwrap$ import openssl$ ``` * Update topenssl.nim * dos2unix tests/stdlib/topenssl.nim Co-authored-by: lihaifeng <lihaifeng@wxm.com>
* Improve uri.parseQuery to never raise an error (#16647)Mildred Ki'Lya2021-01-121-2/+1
| | | | | | | | | | | | | | | | | In case of malformed query string where there is `=` on the value, handle this character as part of the value instead of throwing an error. The following query string should no longer crash a program: key=value&key2=x=1 It will be interpreted as [("key", "value"), ("key2", "x=1")] This is correct according to latest WhatWG's HTML5 specification recarding the urlencoded parser: https://url.spec.whatwg.org/#concept-urlencoded-parser Older behavior can be restored using the -d:nimLegacyParseQueryStrict flag.
* RST: implement internal targets (#16614)Andrey Makarov2021-01-111-0/+158
|
* fix negative nan (#16628)flywind2021-01-111-2/+14
|
* fix #16555, fixes #16405: len, high honors '\0' for cstring in vm (#16610)Timothee Cour2021-01-112-3/+49
|