for(var mkdirp=require("../").mkdirp,path=require("path"),fs=require("fs"),test=require("tap").test,_0777=parseInt("0777",8),_0755=parseInt("0755",8),_0744=parseInt("0744",8),ps=["","tmp"],i=0;i<25;i++){var dir=Math.floor(Math.random()*Math.pow(16,4)).toString(16);ps.push(dir)}var file=ps.join("/");test("chmod-pre",function(r){var i=_0744;mkdirp(file,i,function(t){r.ifError(t,"should not error"),fs.stat(file,function(t,o){r.ifError(t,"should exist"),r.ok(o&&o.isDirectory(),"should be directory"),r.equal(o&&o.mode&_0777,i,"should be 0744"),r.end()})})}),test("chmod",function(r){mkdirp(file,_0755,function(i){r.ifError(i,"should not error"),fs.stat(file,function(i,t){r.ifError(i,"should exist"),r.ok(t&&t.isDirectory(),"should be directory"),r.end()})})});