diff options
author | metagn <metagngn@gmail.com> | 2023-05-11 11:23:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 10:23:52 +0200 |
commit | 02be212daee78e3fca9f6b9524c4f3b221e552f3 (patch) | |
tree | 72ae4923ab997d476864d971cd5589143ed71dc8 /tests/stdlib/tosproc.nim | |
parent | 3a08e2e6ace20f086ba24360c7139852a75b93b2 (diff) | |
download | Nim-02be212daee78e3fca9f6b9524c4f3b221e552f3.tar.gz |
clean up SOME pending/xxx/issue link comments (#21826)
* clean up SOME pending/xxx/issue link comments * great
Diffstat (limited to 'tests/stdlib/tosproc.nim')
-rw-r--r-- | tests/stdlib/tosproc.nim | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/stdlib/tosproc.nim b/tests/stdlib/tosproc.nim index 1184503f5..da4f6252d 100644 --- a/tests/stdlib/tosproc.nim +++ b/tests/stdlib/tosproc.nim @@ -94,9 +94,7 @@ else: # main driver const sourcePath = currentSourcePath() let dir = getCurrentDir() / "tests" / "osproc" - template deferScoped(cleanup, body) = - # pending https://github.com/nim-lang/RFCs/issues/236#issuecomment-646855314 - # xxx move to std/sugar or (preferably) some low level module + template deferring(cleanup, body) = try: body finally: cleanup @@ -250,14 +248,14 @@ else: # main driver var x = newStringOfCap(120) block: # startProcess stdout poStdErrToStdOut (replaces old test `tstdout` + `ta_out`) var p = startProcess(output, dir, options={poStdErrToStdOut}) - deferScoped: p.close() + deferring: p.close() do: var sout: seq[string] while p.outputStream.readLine(x): sout.add x doAssert sout == @["start ta_out", "to stdout", "to stdout", "to stderr", "to stderr", "to stdout", "to stdout", "end ta_out"] block: # startProcess stderr (replaces old test `tstderr` + `ta_out`) var p = startProcess(output, dir, options={}) - deferScoped: p.close() + deferring: p.close() do: var serr, sout: seq[string] while p.errorStream.readLine(x): serr.add x |