From: Cheng Zhao Date: Thu, 24 Sep 2015 04:15:18 +0000 (+0800) Subject: spec: Reading asar file should not leak fd X-Git-Tag: v0.33.2~14^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=269f70c12ab8eaeff2da8e0f32ebcfffcb794d8f;p=electron.git spec: Reading asar file should not leak fd --- diff --git a/spec/asar-spec.coffee b/spec/asar-spec.coffee index 4ef9337f..1e6ee691 100644 --- a/spec/asar-spec.coffee +++ b/spec/asar-spec.coffee @@ -8,6 +8,10 @@ describe 'asar package', -> describe 'node api', -> describe 'fs.readFileSync', -> + it 'does not leak fd', -> + for i in [1..10000] + fs.readFileSync(path.join(process.resourcesPath, 'atom.asar', 'renderer', 'api', 'lib', 'ipc.js')) + it 'reads a normal file', -> file1 = path.join fixtures, 'asar', 'a.asar', 'file1' assert.equal fs.readFileSync(file1).toString().trim(), 'file1'