summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/test/server/ls.js
blob: 3258d8ddcbe38b637a4398660d9009f6723f1bc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var concat = require('../../')
var spawn = require('child_process').spawn
var exec = require('child_process').exec
var test = require('tape')

test('ls command', function (t) {
  t.plan(1)
  var cmd = spawn('ls', [ __dirname ])
  cmd.stdout.pipe(
    concat(function(out) {
      exec('ls ' + __dirname, function (err, body) {
        t.equal(out.toString('utf8'), body.toString('utf8'))
      })
    })
  )
})