Skip to content

Commit 326ffff

Browse files
elidoranothiym23
authored andcommitted
test: fix /tmp test to work on windows
Credit: @elidoran Reviewed-By: @othiym23 PR-URL: #77
1 parent 39b6e5c commit 326ffff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/basic.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var nopt = require("../")
22
, test = require('tap').test
3-
3+
, isWin = process.platform === 'win32'
44

55
test("passing a string results in a string", function (t) {
66
var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0)
@@ -148,7 +148,7 @@ test("other tests", function (t) {
148148
,["--color --logfd 7", {logfd:7,color:true}, []]
149149
,["--color=true", {color:true}, []]
150150
,["--logfd=10", {logfd:10}, []]
151-
,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]]
151+
,["--tmp=/tmp -tar=gtar", {tmp: isWin ? "C:\\tmp" : "/tmp",tar:"gtar"},[]]
152152
,["--tmp=tmp -tar=gtar",
153153
{tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]]
154154
,["--logfd x", {}, []]

0 commit comments

Comments
 (0)