| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,16 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + // Refs: https://github.com/nodejs/node/issues/7342 | ||
| 3 | + const common = require('../common'); | ||
| 4 | + const assert = require('assert'); | ||
| 5 | + const exec = require('child_process').exec; | ||
| 6 | + | ||
| 7 | + const expectedCalls = 2; | ||
| 8 | + | ||
| 9 | + const cb = common.mustCall((data) => { | ||
| 10 | + assert.strictEqual(typeof data, 'string'); | ||
| 11 | + }, expectedCalls); | ||
| 12 | + | ||
| 13 | + const command = common.isWindows ? 'dir' : 'ls'; | ||
| 14 | + exec(command).stdout.on('data', cb); | ||
| 15 | + | ||
| 16 | + exec('fhqwhgads').stderr.on('data', cb); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments