Skip to content

Commit 5bdc1d6

Browse files
committed
test: Add test case for regression in npm/cli (#203)
1 parent fbbf22e commit 5bdc1d6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/basic.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,17 @@ t.test('file: spec with non URI compatible components', t => {
756756
t.end()
757757
})
758758

759+
t.test('file: spec with encoded URI components', t => {
760+
t.has(normalizePaths(npa('file:/test_%23dir')), {
761+
type: 'directory',
762+
name: null,
763+
rawSpec: 'file:/test_%23dir',
764+
fetchSpec: '/test_#dir',
765+
saveSpec: 'file:/test_#dir',
766+
})
767+
t.end()
768+
})
769+
759770
t.test('directory cwd has non URI compatible components', t => {
760771
// eslint-disable-next-line max-len
761772
const where = '/tmp/ !"$%&\'()*+,-.0123456789:;<=>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'

0 commit comments

Comments
 (0)