mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
14 lines
476 B
CoffeeScript
14 lines
476 B
CoffeeScript
assert = require 'assert'
|
|
ChildProcess = require 'child-process'
|
|
|
|
ChildProcess.exec "echo hello", (error, stdout, stderr) ->
|
|
assert.equal "hello", stdout.trim()
|
|
assert.equal null, error
|
|
|
|
ChildProcess.exec "derp hello", (error, stdout, stderr) ->
|
|
assert.equal "/bin/bash: derp: command not found", stderr.trim()
|
|
assert.ok error
|
|
assert.equal 127, error.code
|
|
|
|
ChildProcess.exec "coffee -e 'console.log 1+1'", (error, stdout, stderr) ->
|
|
assert.equal "2", stdout.trim() |