test.command.executableSubcommand.js
This file
Path
test/test.command.executableSubcommand.js
43 lines · 1.3 KiB · JavaScript
Last changed by
Merge pull request #935 from MarshallOfSound/fix-deep-sym-link-resolutionTomoaki Abebefore adoption50922d8
History of this fileTake it
The walk stopped after 200 commits: lines older than 6135fbc point at it.
Merge pull request #349 from zhiyelee/fix-globalZhiye Libefore adoption1ebf2a4
lines 1–2why, one step back1var exec = require('child_process').exec2 , path = require('path')Merge pull request #342 from demohi/patch-1Zhiye Libefore adoption6135fbc
lines 3–6why, one step back3 , should = require('should');456Merge pull request #349 from zhiyelee/fix-globalZhiye Libefore adoption1ebf2a4
lines 7–13why, one step back7var bin = path.join(__dirname, './fixtures/pm')8// not exist9exec(bin + ' list', function (error, stdout, stderr) {10 //stderr.should.equal('\n pm-list(1) does not exist, try --help\n\n');11 // TODO error info are not the same in between <=v0.8 and later version12 should.notEqual(0, stderr.length);13});Merge pull request #342 from demohi/patch-1Zhiye Libefore adoption6135fbc
line 14why, one step back14Merge pull request #349 from zhiyelee/fix-globalZhiye Libefore adoption1ebf2a4
lines 15–17why, one step back15// success case16exec(bin + ' install', function (error, stdout, stderr) {17 stdout.should.equal('install\n');Merge pull request #342 from demohi/patch-1Zhiye Libefore adoption6135fbc
lines 18–19why, one step back18});19Merge pull request #387 from zhiyelee/bugfix_subcommandZhiye Libefore adoptiondae7802
lines 20–24why, one step back20// subcommand bin file with explicit extension21exec(bin + ' publish', function (error, stdout, stderr) {22 stdout.should.equal('publish\n');23});24Merge pull request #349 from zhiyelee/fix-globalZhiye Libefore adoption1ebf2a4
lines 25–29why, one step back25// spawn EACCES26exec(bin + ' search', function (error, stdout, stderr) {27 // TODO error info are not the same in between <v0.10 and v0.1228 should.notEqual(0, stderr.length);29});Merge pull request #342 from demohi/patch-1Zhiye Libefore adoption6135fbc
line 30why, one step back30Merge pull request #349 from zhiyelee/fix-globalZhiye Libefore adoption1ebf2a4
lines 31–36why, one step back31// when `bin` is a symbol link for mocking global install32var bin = path.join(__dirname, './fixtures/pmlink')33// success case34exec(bin + ' install', function (error, stdout, stderr) {35 stdout.should.equal('install\n');36});Merge pull request #935 from MarshallOfSound/fix-deep-sym-link-resolutionTomoaki Abebefore adoption50922d8
lines 37–43why, one step back3738// when `bin` is a symbol link pointing at a symbolic for mocking global install39var bin = path.join(__dirname, './fixtures/another-dir/pm')40// success case41exec(bin + ' install', function (error, stdout, stderr) {42 stdout.should.equal('install\n');43});