]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-package-arg/test/windows.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / npm-package-arg / test / windows.js
1 global.FAKE_WINDOWS = true
2
3 var npa = require("../npa.js")
4 var test = require("tap").test
5 var path = require("path")
6
7 var cases = {
8   "C:\\x\\y\\z": {
9     raw: "C:\\x\\y\\z",
10     scope: null,
11     name: null,
12     rawSpec: "C:\\x\\y\\z",
13     spec: path.resolve("C:\\x\\y\\z"),
14     type: "local"
15   },
16   "foo@C:\\x\\y\\z": {
17     raw: "foo@C:\\x\\y\\z",
18     scope: null,
19     name: "foo",
20     rawSpec: "C:\\x\\y\\z",
21     spec: path.resolve("C:\\x\\y\\z"),
22     type: "local"
23   },
24   "foo@/foo/bar/baz": {
25     raw: "foo@/foo/bar/baz",
26     scope: null,
27     name: "foo",
28     rawSpec: "/foo/bar/baz",
29     spec: path.resolve("/foo/bar/baz"),
30     type: "local"
31   }
32 }
33
34 test("parse a windows path", function (t) {
35   Object.keys(cases).forEach(function (c) {
36     var expect = cases[c]
37     var actual = npa(c)
38     t.same(actual, expect, c)
39   })
40   t.end()
41 })