Parashurama
d04ca6ef23
Improve & optimize strutils 'find' procs ( #5196 )
...
* add 'last' argument to 'find' procs in strutils
* add 'rfind' proc for looking up set[char] in strutils
* use optimised C function 'memchr' when available
2017-01-11 09:48:31 +01:00
Andreas Rumpf
013e11fcc4
add copyDir stdlib test
2017-01-10 11:27:03 +01:00
Chris Heller
af63bd4e0b
Update unit test to handle AssertionError instead of ValueError for #5119
2016-12-21 19:06:11 -08:00
Chris Heller
40d034b7e3
Guard against calling split with an empty string as a separator. Fixes #5119
2016-12-21 12:06:59 -08:00
Araq
7f8a02d0c6
make tos.nim green on Windows
2016-12-13 09:01:53 +01:00
Dominik Picheta
d6ab21eed5
Merge pull request #5080 from FedericoCeratto/httpheaders
...
Add HTTP header deletion, improve tests
2016-12-01 18:01:04 +01:00
Federico Ceratto
74e442f766
Add HTTP header deletion, improve tests
2016-12-01 00:11:59 +00:00
Dmitry Polienko
6bd86f7543
Rewrite xmltools.innerText
...
Make it recursive, define for node types other than xnElement
2016-11-30 10:38:22 +07:00
Ruslan Mustakov
2c146445bc
Added deques module, deprecating queues
2016-11-24 19:11:51 +07:00
Felix Krause
434c27343e
Parse 'Z' as valid timezone if offset is expected
2016-11-14 18:46:35 +01:00
Felix Krause
aa08c32c2b
Improved -; fixed tests
...
* added prefix `-` operator for TimeInterval
* improved `-` for both TimeInterval and TimeInfo
* Fixed a DST test
2016-11-14 18:28:55 +01:00
Felix Krause
544a2cfe1a
Fixed daylight saving time
...
* When formatting timezone, substract 1 hour from timezone when isDST
* Do not depend DST in current timezone when parsing arbitrary date
because formatted timestamps are never in DST.
* On the way, removed an unnecessary line in parsing code which could
cause bugs.
* Added DST tests
2016-11-14 18:28:55 +01:00
Felix Krause
91a0674961
Fixed timezone rendering, added test
2016-11-10 19:03:46 +01:00
Andreas Rumpf
4c79583a95
Merge pull request #5002 from goldenreign/time-compare-nosideeffect
...
Add 'noSideEffect' pragma for Time type's operators. Fixes #4981
2016-11-07 16:52:34 +01:00
goldenreign
554105ff7c
Add 'noSideEffect' pragma for Time type's operators
2016-11-07 12:14:28 +07:00
Felix Krause
9d5de8021b
Use ISO 8601 format for times.$. Fixed tests.
...
* `$` now uses format() with explicit time zone.
* Fixed errors in rendering "z", "zz" and "zzz"
* Updated tests
2016-11-01 21:14:52 +01:00
Felix Krause
170745eb39
Removed tzname because it's broken
...
* No mapping between TimeInfo.tzname and TimeInfo.timezone
* tzname of time.h is not well-defined, may have almost arbitrary
length, and localization may differ
* Code used hardcoded "UTC" string
2016-11-01 20:26:50 +01:00
jlp765
55b28f86e1
add test: echo a seq with a nil value
2016-11-01 13:41:31 +10:00
Andreas Rumpf
2f725e923e
Merge pull request #4924 from nigredo-tori/fix-4917
...
Make createDir return discardable bool
2016-10-24 20:30:52 +02:00
Araq
a85e954b5d
make tgetfileinfo work on Windows
2016-10-24 20:18:49 +02:00
Araq
6d645e5240
Merge branch 'devel' of https://github.com/rudis/Nim into rudis-devel
2016-10-24 20:11:00 +02:00
Dmitry Polienko
1cd4799b01
Improve as previously discussed
...
Better name for exposed primitive function, checks for pre-existing files
2016-10-22 18:39:10 +07:00
Dmitry Polienko
45b432b901
Revert createDir signature, expose rawCreateDir
2016-10-22 17:37:28 +07:00
Dmitry Polienko
48ef6761d8
Make createDir return discardable bool
2016-10-22 12:29:03 +07:00
Jonathan Bernard
b7232bd425
Fix #4922 , bug in times.parse, mishandling DST.
2016-10-21 17:06:36 -05:00
Jonathan Bernard
68d3486f5a
Bugfix for times.initInterval (issue #4889 )
...
`initInterval` had logic to calculate and carry overflowed fields (65 seconds
turns into 5 seconds and carries 1 minute). However, we were not including that
carried value when we recalculate the carry over for the next period of time.So
if you had, for example, 3600 seconds, we carried 60 minutes into the minutes
calculation, but when we calculated how much we should carry into the hours
value we only considered what the user originally supplied for the minutes
field, and forgot to include those 60 carried minute.
So, for example, with the previous implementation this was true:
`seconds(60 * 60 * 24) == seconds(0)`
Or, as failing tests:
```nimrod
import times
assert seconds(60 * 60 * 24) != seconds(0)
assert seconds(60 * 60 * 24) == days(1)
```
2016-10-12 15:44:21 -05:00
Dominik Picheta
cff6ec2155
Implements onProgressChanged callback for httpclient.
2016-09-24 22:58:10 +02:00
Dominik Picheta
0baef8e6ea
Implements getContent and postContent for (Async)HttpClient.
2016-09-24 20:33:00 +02:00
Dominik Picheta
fa9ec7a6b5
Handle redirects in HttpClient's post procs & post test.
2016-09-24 17:50:58 +02:00
Dominik Picheta
1fb5dd2477
Fixes #4797 .
2016-09-19 19:36:35 +02:00
Dominik Picheta
8386476592
Implements proxy support for (Async)HttpClient. Ref #4423 .
...
Fixes #2160 .
2016-09-18 22:59:12 +02:00
Dominik Picheta
0c99523ad3
Implements timeouts for synchronous HttpClient.
2016-09-18 19:08:12 +02:00
Dominik Picheta
3ad368f8ca
Improvements to httpclient. Refs #4423 .
...
* Adds ability to query HttpCode and compare it with strings.
* Moves HttpMethod to HttpCore module.
* Implements synchronous HttpClient using {.multisync.}.
2016-09-18 18:16:51 +02:00
Simon Ruderich
4414dafd5e
tests: add more tests for getFileInfo()
2016-09-17 19:13:30 +02:00
Ruslan Mustakov
e26f9cb665
Use array encoding for non-UTF-8 strings in marshal. Fixes #4779 .
2016-09-16 17:02:34 +07:00
Andreas Rumpf
feec7f9334
Merge pull request #4629 from flyx/times-parse-yearday
...
Calculate correct yearday in times.parse
2016-08-25 16:36:49 +02:00
Felix Krause
74a55995f0
Fixed tests to expect [Suite] output from unittest
2016-08-24 22:32:29 +02:00
Felix Krause
932abc7bf8
Improved times tests
...
* Added check for yearday
* Changed some test dates to check different equivalence classes of
yearday (before leap day, at leap day, after february in leap year,
after february in non-leap year)
2016-08-21 14:19:22 +02:00
Andreas Rumpf
8f457f6ebb
make tests green again
2016-07-29 23:51:01 +02:00
Stephane Fontaine
48867b2541
Update htmlparser test `output` variable
2016-07-28 20:25:12 +04:00
Stephane Fontaine
fa537ee3a4
htmlparser: Add test for paragraph inside <dd,li>
2016-07-27 21:24:51 +04:00
Andreas Rumpf
fc0bb82802
fixes #4494
2016-07-22 22:31:09 +02:00
Joey Payne
890d7fac14
Fix split stdlib test
2016-07-01 07:24:30 -06:00
Joey Payne
33146a74c1
Add os tests for directory creation, iteration and deletion
2016-06-20 14:32:01 -06:00
Andreas Rumpf
95bb19a579
moved random procs from math to its own module (breaking change)
2016-05-30 16:24:52 +02:00
Andreas Rumpf
301d39b882
Merge pull request #4130 from lihf8515/devel
...
Update parsecfg.nim
2016-05-26 10:51:10 +02:00
Andreas Rumpf
4b13484025
Merge pull request #4025 from flyx/highlight-yaml
...
YAML highlighting support for doctools/highlite
2016-05-12 14:59:00 +02:00
lihf8515
a1de24e2f6
Update tparscfg.nim
2016-05-02 16:59:38 +08:00
Felix Krause
6fe916fc77
Fixes to YAML highlighting support, added tests
2016-04-01 21:35:46 +02:00
Anatoly Galiulin
9aa845c6b6
Add parseUInt and parseBiggestUInt functions to stdlib (parseutils, strutils)
2016-03-30 17:38:57 +06:00