Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c389526

Browse filesBrowse files
PaulBagstargos
authored andcommitted
test: add tests for spaces in folder names
Add tests for spaces in folder names for path.win32.dirname(). PR-URL: #28819 Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 2236aff commit c389526
Copy full SHA for c389526

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-path-dirname.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-path-dirname.js
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,21 @@ assert.strictEqual(path.win32.dirname('c:\\foo\\'), 'c:\\');
2121
assert.strictEqual(path.win32.dirname('c:\\foo\\bar'), 'c:\\foo');
2222
assert.strictEqual(path.win32.dirname('c:\\foo\\bar\\'), 'c:\\foo');
2323
assert.strictEqual(path.win32.dirname('c:\\foo\\bar\\baz'), 'c:\\foo\\bar');
24+
assert.strictEqual(path.win32.dirname('c:\\foo bar\\baz'), 'c:\\foo bar');
2425
assert.strictEqual(path.win32.dirname('\\'), '\\');
2526
assert.strictEqual(path.win32.dirname('\\foo'), '\\');
2627
assert.strictEqual(path.win32.dirname('\\foo\\'), '\\');
2728
assert.strictEqual(path.win32.dirname('\\foo\\bar'), '\\foo');
2829
assert.strictEqual(path.win32.dirname('\\foo\\bar\\'), '\\foo');
2930
assert.strictEqual(path.win32.dirname('\\foo\\bar\\baz'), '\\foo\\bar');
31+
assert.strictEqual(path.win32.dirname('\\foo bar\\baz'), '\\foo bar');
3032
assert.strictEqual(path.win32.dirname('c:'), 'c:');
3133
assert.strictEqual(path.win32.dirname('c:foo'), 'c:');
3234
assert.strictEqual(path.win32.dirname('c:foo\\'), 'c:');
3335
assert.strictEqual(path.win32.dirname('c:foo\\bar'), 'c:foo');
3436
assert.strictEqual(path.win32.dirname('c:foo\\bar\\'), 'c:foo');
3537
assert.strictEqual(path.win32.dirname('c:foo\\bar\\baz'), 'c:foo\\bar');
38+
assert.strictEqual(path.win32.dirname('c:foo bar\\baz'), 'c:foo bar');
3639
assert.strictEqual(path.win32.dirname('file:stream'), '.');
3740
assert.strictEqual(path.win32.dirname('dir\\file:stream'), 'dir');
3841
assert.strictEqual(path.win32.dirname('\\\\unc\\share'),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.