Skip to content

Commit 8890141

Browse files
committed
Update CLI
1 parent ec09299 commit 8890141

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

lib/node_modules/@stdlib/string/percent-encode/bin/cli

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ function main() {
4545
// Create a command-line interface:
4646
cli = new CLI({
4747
'pkg': require( './../package.json' ),
48-
'options': require( './opts.json' ),
49-
'help': readFileSync( join( __dirname, 'usage.txt' ), {
48+
'options': require( './../etc/cli_opts.json' ),
49+
'help': readFileSync( join( __dirname, '..', 'docs', 'usage.txt' ), {
5050
'encoding': 'utf8'
5151
})
5252
});
53+
5354
// Get any provided command-line arguments:
5455
args = cli.args();
5556

lib/node_modules/@stdlib/string/percent-encode/test/test.cli.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ tape( 'when invoked with a `--help` flag, the command-line interface prints the
3535
var expected;
3636
var cmd;
3737

38-
expected = readFileSync( resolve( __dirname, '..', 'bin', 'usage.txt' ), {
38+
expected = readFileSync( resolve( __dirname, '..', 'docs', 'usage.txt' ), {
3939
'encoding': 'utf8'
4040
});
4141
cmd = [
@@ -61,7 +61,7 @@ tape( 'when invoked with a `-h` flag, the command-line interface prints the help
6161
var expected;
6262
var cmd;
6363

64-
expected = readFileSync( resolve( __dirname, '..', 'bin', 'usage.txt' ), {
64+
expected = readFileSync( resolve( __dirname, '..', 'docs', 'usage.txt' ), {
6565
'encoding': 'utf8'
6666
});
6767
cmd = [
@@ -145,7 +145,7 @@ tape( 'the command-line interface percent-encodes a string argument', opts, func
145145

146146
tape( 'the command-line interface supports use as a standard stream', opts, function test( t ) {
147147
var cmd = [
148-
'printf ',
148+
'printf "☃\n𐐷"',
149149
'|',
150150
process.execPath,
151151
fpath
@@ -157,7 +157,7 @@ tape( 'the command-line interface supports use as a standard stream', opts, func
157157
if ( error ) {
158158
t.fail( error.message );
159159
} else {
160-
t.strictEqual( stdout.toString(), '%E2%98%83\n', 'expected value' );
160+
t.strictEqual( stdout.toString(), '%E2%98%83%A%F0%90%90%B7\n', 'expected value' );
161161
t.strictEqual( stderr.toString(), '', 'does not print to `stderr`' );
162162
}
163163
t.end();

0 commit comments

Comments
 (0)