Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (26 sloc) 0.609 kb
require('helper')
local spawn = require('childprocess').spawn
local os = require('os')
local environmentTestResult = false
function test()
local options = {
env = { TEST1 = 1 }
}
local child
if os.type() == 'win32' then
child = spawn('cmd.exe', {'/C', 'set'}, options)
else
child = spawn('bash', {'-c', 'set'}, options)
end
child.stdout:on('data', function(chunk)
print(chunk)
if chunk:find('TEST1=1') then
environmentTestResult = true
end
end)
end
test()
assert(process.pid ~= nil)
process:on('exit', function()
assert(environmentTestResult == true)
end)
Jump to Line
Something went wrong with that request. Please try again.