Skip to content

Commit

Permalink
src: fix SplitString to ignore white spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Mar 10, 2019
1 parent 4e9dc31 commit 9892d6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ std::vector<std::string> SplitString(const std::string& in, char delim) {
while (in_stream.good()) {
std::string item;
std::getline(in_stream, item, delim);
if (item.empty()) continue;
out.emplace_back(std::move(item));
}
return out;
Expand Down
2 changes: 2 additions & 0 deletions test/parallel/test-cli-node-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ tmpdir.refresh();
const printA = require.resolve('../fixtures/printA.js');
expect(`-r ${printA}`, 'A\nB\n');
expect(`-r ${printA} -r ${printA}`, 'A\nB\n');
expect(` -r ${printA} -r ${printA}`, 'A\nB\n');
expect(` --require ${printA} --require ${printA}`, 'A\nB\n');
expect('--no-deprecation', 'B\n');
expect('--no-warnings', 'B\n');
expect('--no_warnings', 'B\n');
Expand Down

0 comments on commit 9892d6c

Please sign in to comment.