summary refs log tree commit diff stats
path: root/tests/stdlib/tmemfiles2.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fixes incorrect fd==0 test on Unix; Conserves handles by default. (#5512)c-blake2017-03-121-1/+1
| | | | | | | | | | | | | | * Fix 2 problems. First, 0 is a valid fd on Unix (easily gotten if user first closes all fds and then starts using memfiles). Use -1 instead for an invalid fd. Second, it is best practice to conserve open fds on Unix and file handles on Windows. These handles are not needed unless the user wants to remap the memory with ``mapMem`` (or a hypothetical future ``proc resize``). Adding a new bool param ``allowRemap=false`` to ``memfiles.open`` solves this cleanly in a "mostly" backward compatible way. This is only "mostly" because the default ``false`` case does not keep unneeded resources allocated, but that most sensible default means that any ``mapMem`` callers need to fix all their open calls to have allowRemap=true, as this PR also does for tmemfiles2.nim. * Include backwards compatibility note.
* fixes #2473; cleanup of some testsAraq2015-09-301-0/+2
|
* minor fix - remove comments from discard sectionJamesP2015-09-271-1/+0
| | | | so koch test doesn't complain
* add memfiles test of create/read/write dataJamesP2015-09-241-0/+38
an> ^
287dec06a ^


6f1289b80 ^



31bb67a30 ^

24445d31b ^
a4e6b242d ^
5c4692fad ^
8535b26a7 ^
8535b26a7 ^
cf0cf32d2 ^
5c4692fad ^
cc0f02d57 ^
c08c45501 ^
5c4692fad ^
e7bac9177 ^
f89ba2c95 ^
97259a5ab ^

ef2998778 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46