var mkdirp=require("../"),path=require("path"),fs=require("fs"),exists=fs.exists||path.exists,test=require("tap").test,_0777=parseInt("0777",8),_0755=parseInt("0755",8);test("woo",function(t){t.plan(5);var r="/tmp/"+[Math.floor(Math.random()*Math.pow(16,4)).toString(16),Math.floor(Math.random()*Math.pow(16,4)).toString(16),Math.floor(Math.random()*Math.pow(16,4)).toString(16)].join("/");mkdirp(r,_0755,function(o){t.ifError(o),exists(r,function(o){t.ok(o,"file created"),fs.stat(r,function(r,o){t.ifError(r),t.equal(o.mode&_0777,_0755),t.ok(o.isDirectory(),"target not a directory")})})})});