-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
npm install
respect config.unicode
`npm ls` and `npm star` already do, just `npm install` was missed.
- Loading branch information
Sean McGivern
committed
Apr 18, 2014
1 parent
8b5e7b6
commit e3a2ec4
Showing
5 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
var common = require('../common-tap.js') | ||
var test = require('tap').test | ||
var npm = require('../../') | ||
var mkdirp = require('mkdirp') | ||
var mr = require('npm-registry-mock') | ||
var exec = require('child_process').exec | ||
|
||
var pkg = __dirname + '/install-cli' | ||
var NPM_BIN = __dirname + '/../../bin/npm-cli.js' | ||
|
||
function hasOnlyAscii (s) { | ||
return /^[\000-\177]*$/.test(s) ; | ||
} | ||
|
||
test('does not use unicode with --unicode false', function (t) { | ||
t.plan(3) | ||
mr(common.port, function (s) { | ||
exec('node ' + NPM_BIN + ' install --unicode false read', { | ||
cwd: pkg | ||
}, function(err, stdout) { | ||
t.ifError(err) | ||
t.ok(stdout, stdout.length) | ||
t.ok(hasOnlyAscii(stdout)) | ||
s.close() | ||
}) | ||
}) | ||
}) | ||
|
||
test('cleanup', function (t) { | ||
mr(common.port, function (s) { | ||
exec('node ' + NPM_BIN + ' uninstall read', { | ||
cwd: pkg | ||
}, function(err, stdout) { | ||
s.close() | ||
}) | ||
}) | ||
t.end() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Tests for `npm install` CLI output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "install-cli", | ||
"description": "fixture", | ||
"version": "0.0.1", | ||
"main": "index.js", | ||
"dependencies": { | ||
"read": "1.0.5" | ||
}, | ||
"repository": "git://github.com/robertkowalski/bogusfixture" | ||
} |