var mkdirp=require("../"),path=require("path"),test=require("tap").test,mockfs=require("mock-fs"),_0777=parseInt("0777",8),_0755=parseInt("0755",8);test("opts.fs sync",function(t){t.plan(4);var o="/beep/boop/"+[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("/"),r=mockfs.fs();mkdirp.sync(o,{fs:r,mode:_0755}),r.exists(o,function(a){t.ok(a,"created file"),r.stat(o,function(o,r){t.ifError(o),t.equal(r.mode&_0777,_0755),t.ok(r.isDirectory(),"target not a directory")})})});