Skip to content

Commit

Permalink
test: fix /tmp test to work on windows
Browse files Browse the repository at this point in the history
Credit: @elidoran
Reviewed-By: @othiym23
PR-URL: #77
  • Loading branch information
elidoran authored and othiym23 committed Dec 13, 2016
1 parent 39b6e5c commit 326ffff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/basic.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var nopt = require("../")
, test = require('tap').test

, isWin = process.platform === 'win32'

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

0 comments on commit 326ffff

Please # to comment.