summary refs log tree commit diff stats
path: root/tests/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* fixes #8916 by fixing typeinfo and marshal. (#9341)Vindaar2018-10-131-0/+13
| | | | | | | | | * fixes #8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo Need to check in `typeinfo` for nil of the underlying pointer. In marshal don't have to check for nil of seq anymore. * remove reference to string, sequence in `isNil` doc string
* Testament pre parallel (#9137)Jacek Sieka2018-10-121-1/+1
| | | | | | | | | | * testament: move to root dir (it's not a test) * osproc: fix process index passed to afterRunEvent for parallel runs it was passing the index of the process, not index of all commands * testament: complete file move
* 8684 add shortcut sort procs (#9174)Konstantin Molchanov2018-10-111-1/+61
| | | | | | | | * Stdlib: Algorithm: Add shortcut versions of sort, sorted, and isSorted procs. * Add tests for sort, sorted, and isSorted procs from algorithm module. * Merge sort tests into tsortcall.nim, remove tsort.nim. * Stdlib: Algorithm: Add shortcut versions of sort, sorted, and isSorted procs. * Add tests for sort, sorted, and isSorted procs from algorithm module. * Merge sort tests into tsortcall.nim, remove tsort.nim.
* Fix tests on NixOS (#9209) (#9285)xzfc2018-10-101-1/+1
| | | | | | | * Replace `/bin/sleep` with just `sleep`, i.e. use environment variable `$PATH` to locate binary. * Replace `/usr/share/zoneinfo` with `$TZDIR` when it is defined, fallback to hardcoded path otherwise. This is the same behavior that Glibc2 normally have, see man 3 tzset.
* fix #8341: add lastPathPart (#9116)Timothee Cour2018-10-091-19/+42
|
* 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
|
* Convert *_family fields to cushortLemonBoy2018-09-191-2/+2
| | | | Fixes #9008
* add test caseVindaar2018-09-171-0/+16
|
* fixes #8911Andreas Rumpf2018-09-161-0/+15
|
* fixes #8961Araq2018-09-141-1/+10
|
* closes #5252Araq2018-09-031-0/+19
|
* Add interpreting event parser proc to pegs module. (#8075)gemath2018-08-241-36/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added simple interpreting event parser to pegs module. * Has side-effects problem. * Macro solution works. * First flat callback test works. * Fixed namespace pollution. * Added handler for pkChar. * Replaced event parser test. * Started extensive docs. * 'callback' to 'handler' renaming part 1. * Renaming 'callback' to 'handler' part2, completed comments. * Fixed exported API pollution. * Added more event handler hooks, fixed comments. * Changed event parser addition entry. * Fixed variable names and comments. * Enhanced comment. * Leave handlers are not called for an unsuccessful match. * The three varieties of back-reference matches are processed in separate of-clauses now. * Improved hygiene and (almost) eliminated exports. * Trying to fix CI test breakage by eliminating export. * Trying to fix CI test breakage by eliminating exports. * Re-activated leave handler code execution for unsuccessful matches. * Eliminated the last export statement (with a funny smelling hack). * Make sure leave handler code is executed for all unsuccessful matcher cases. * Replaced local unicode.`==` with export.
* Cleanup ttimes (#8714)Oscar Nihlgård2018-08-221-101/+72
| | | | | | * Refactor fromWinTime * Cleanup ttimes
* Fixes ropes regressions due to the not-nil strings (#8687)Dmitry Atamanov2018-08-201-0/+36
|
* times.Timezone changes (#8527)Oscar Nihlgård2018-08-171-24/+6
| | | | | | | | | | * Use floorDiv in times.nim * New implementation of times.Timezone * Tweak doc comments * Fix typo
* changes how the now illegal 'string == nil' comparison is detectedAndreas Rumpf2018-08-151-0/+4
|
* Merge branch 'devel' into araq-miscAraq2018-08-131-1/+8
|\
| * Fixed 7478: splitLines keepEol option (#8621)Iván Montes2018-08-131-1/+8
| |
* | make more tests greenAndreas Rumpf2018-08-134-9/+9
|/
* fixes #8519; implements T.distinctBase to reverse T = distinct A (#8531)Timothee Cour2018-08-101-0/+29
|
* fix wrong arch defined(osx) (#8492)Timothee Cour2018-08-021-1/+1
|
* fixes #8468, stdlib.encodings.convert not crash anymore on windows (#8470)andri lim2018-07-301-0/+21
|
* fixes #8037, json.to support object with distinct types (#8086)andri lim2018-07-191-3/+102
| | | | | | * add distinct types to json 'to' macro * fix json 'to' macro and add more test
* New implementations of times.parse & times.format (#8094)Oscar Nihlgård2018-07-091-61/+149
|
* Add normalizePath and testsFederico Ceratto2018-07-061-0/+62
|
* Merge branch 'araq-devel' of github.com:nim-lang/Nim into araq-develAndreas Rumpf2018-07-061-2/+3
|\
| * make tmemfile2 work againAraq2018-07-061-2/+3
| |
* | make tests green againAndreas Rumpf2018-07-061-1/+1
|/
* make test green for OSXAndreas Rumpf2018-07-061-2/+5
|
* Merge branch 'devel' into araq-develAndreas Rumpf2018-07-041-0/+41
|\
| * Fix os.unixToNativePath proc returns wrong result(#8179) (#8181)Tomohiro2018-07-021-0/+41
| | | | | | | | | | | | * Fix os.unixToNativePath proc returns wrong result(#8179) * Add tests for unixToNativePath
* | system.nim: remove deprecated symbolsAndreas Rumpf2018-06-281-2/+2
|/
* Pegs AST read access (#8050)gemath2018-06-191-0/+78
| | | | | | | | | | | | * Make PEG AST nodes readable from outside the module. * Added a test module for the pegs stdlib module. * Edited changelog. * Renamed ``sons`` iterator to ``items``, added ``pairs``, inlined both. * Updated entry and moved it to the right category.
* Add MemMapFileStream. Fixes in memFiles. (#7944)Dmitry Atamanov2018-06-142-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add MemMapFileStream * Added tests * Fixed bug in memfiles (zero index for string) * Added flush to changelog * Attempt to fix Win's nuances * Fix attempt to fix * Continue... * And again... * Reworked tests (all for win on Win) * Fixes in flush (Win) * Replace fn vars to consts * Added the attempts parameter to the flush * Replace while to for * Move to memfiles * Use Natural instead of uint * Better error messages for append mode. Handle specific cases.
* Add parse bin int, fixes #8018 (#8020)Vindaar2018-06-131-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clarify `parseHexInt`, `parseOctInt` docstring and exception msgs * add `parseBinInt` based on `parseutil.parseBin` implementation Adds a `parseBinInt`, which parses a binary integer string and returns it as an integer. This is based on the implementation of `parseutil.parseBin`, removing the unnecessary parts. * add tests for all `parse(Hex|Oct|Bin)Int` procs * replace `parse*Int` proc impls by call to parseutil procs Replaces the `parse(Hex|Oct|Bin)Int` procedure implementation by calls to the `parseutil` procs, which receive a mutable argument. Has the main advantage that the empty string as well as a "prefix only" string, e.g. "0x" counts as an invalid integer. Also moves the `parseOctInt` proc further up in the file so that all `parse` procs are below one another. * replace `var L` by `let L` in `parse` procs There's no reason for the usage of `var` here. * add `maxLen` optional arg for `parseutil.parse(Oct|Bin)` Plus small change to test cases. * update changelog about `parse*Int` procs * fix `rejectParse` template in `tstrutils` * make sure only `s.len` chars are parsed, if `maxLen+start` > s.len Fixes a previous bug in `parseHex` (and now affected `parseOct` and `parseBin`), which allowed to set `start + maxLen` to be larger than the strings length. This resulted in an out of bounds access. * move `parse*Int` proc change to breaking changes, add double `
* Fixed compilation error when Sockaddr_in4 or Sockaddr_in6 passed to fromSockAddrYuriy Glukhov2018-06-071-0/+12
|
* Fix strformat neg zero (#7954)skilchen2018-06-051-0/+8
| | | | | | | | * fix strformat handling of neg zero with sign * better tests for neg zero with sign * use inplace insertion of the sign as suggested by Varriount
* Fix strformat precision handling for strings (#7941)skilchen2018-06-041-0/+26
| | | | | | | | * fix strformat precision handling for strings * add some limited unicode awareness to the precision handling for strings * improvement suggested by Varriount: use setLen and runeOffset instead of runeSubstr
* Use higher time resolution when available in os.nim (#7709)Oscar Nihlgård2018-06-041-0/+10
|
* fix strformat zeropadding for floats (#7934)skilchen2018-06-011-1/+10
|
* Added: type name output when exception raised from unittest (#7869)七秒不觉梦2018-05-281-0/+10
|
* Merge pull request #7624 from skilchen/fix-issue7620Dominik Picheta2018-05-031-0/+6
|\ | | | | there is no hour 0 in am/pm time (see #7620)
| * there is no hour 0 in am/pm timeskilchen2018-04-161-0/+6
| |
* | make more tests greenAraq2018-04-301-1/+0
| |
* | update the documentation about the new strings/seqs behavioursAndreas Rumpf2018-04-291-1770/+0
| |
* | Rename `Time.nanoseconds` to `nanosecond` (#7673)Oscar Nihlgård2018-04-251-2/+6
| | | | | | | | | | | | * Rename `Time.nanoseconds` to `nanosecond` * Fix bug with Duration comparision
* | Add `fromWinTime` and deprecate `unixTimeToWinTime`/`winTimeToUnixTime` (#7641)Oscar Nihlgård2018-04-191-1/+8
|/
* Timeinterval optimization (#7608)Oscar Nihlgård2018-04-161-21/+24
| | | | | | * TimeInterval optimization * Fix typo in `$`(Duration)
* Sub second time resolution (#6978)Oscar Nihlgård2018-04-131-26/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add deprecation warnings to recently deprecated procs * Fix bad usage of the times module * Introduce sub second resolution * Fix usage of C's time() * Switch to nanosecond resolution * Make Time & Duration opaque again and fix some errors * Change back to TimeInterval for shorthands * Fix JS test * Fix build error for windows * Undeprecate epochTime * Documentation and minor changes * Lots of bugfixes and doc comments * Attempt to make travis & appveyor green * Fix edge cases for dealing with the local timezone * Workaround JS backend overflow/underflow bug * Use better workaround for not knowing the size of time_t * Use all available timezones for tests * Fix indentation * Add procs for accessing the fractional part of a duration * Order time units from smallest to largest since it makes more sense * Include months and years in `TimeUnit` * Review fix