diff options
Diffstat (limited to 'node_modules/file-uri-to-path/test')
-rw-r--r-- | node_modules/file-uri-to-path/test/test.js | 24 | ||||
-rw-r--r-- | node_modules/file-uri-to-path/test/tests.json | 13 |
2 files changed, 0 insertions, 37 deletions
diff --git a/node_modules/file-uri-to-path/test/test.js b/node_modules/file-uri-to-path/test/test.js deleted file mode 100644 index 79305dc..0000000 --- a/node_modules/file-uri-to-path/test/test.js +++ /dev/null @@ -1,24 +0,0 @@ - -var sep = require('path').sep || '/'; -var assert = require('assert'); -var uri2path = require('../'); -var tests = require('./tests.json'); - -describe('file-uri-to-path', function () { - - Object.keys(tests).forEach(function (uri) { - - // the test cases were generated from Windows' PathCreateFromUrlA() function. - // On Unix, we have to replace the path separator with the Unix one instead of - // the Windows one. - var expected = tests[uri].replace(/\\/g, sep); - - it('should convert ' + JSON.stringify(uri) + ' to ' + JSON.stringify(expected), - function () { - var actual = uri2path(uri); - assert.equal(actual, expected); - }); - - }); - -}); diff --git a/node_modules/file-uri-to-path/test/tests.json b/node_modules/file-uri-to-path/test/tests.json deleted file mode 100644 index b935a63..0000000 --- a/node_modules/file-uri-to-path/test/tests.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "file://host/path": "\\\\host\\path", - "file://localhost/etc/fstab": "\\etc\\fstab", - "file:///etc/fstab": "\\etc\\fstab", - "file:///c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi", - "file://localhost/c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi", - "file:///c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi", - "file://localhost/c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi", - "file://hostname/path/to/the%20file.txt": "\\\\hostname\\path\\to\\the file.txt", - "file:///c:/path/to/the%20file.txt": "c:\\path\\to\\the file.txt", - "file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc": "C:\\Documents and Settings\\davris\\FileSchemeURIs.doc", - "file:///C:/caf%C3%A9/%C3%A5r/d%C3%BCnn/%E7%89%9B%E9%93%83/Ph%E1%BB%9F/%F0%9F%98%B5.exe": "C:\\café\\år\\dünn\\牛铃\\Phở\\😵.exe" -} |