varmkdirp=require('../');varpath=require('path');varfs=require('fs');varexists=fs.exists||path.exists;vartest=require('tap').test;test('rel',function(t){t.plan(5);varx=Math.floor(Math.random()*Math.pow(16,4)).toString(16);vary=Math.floor(Math.random()*Math.pow(16,4)).toString(16);varz=Math.floor(Math.random()*Math.pow(16,4)).toString(16);varcwd=process.cwd();process.chdir('/tmp');varfile=[x,y,z].join('/');mkdirp(file,0755,function(err){t.ifError(err);exists(file,function(ex){t.ok(ex,'file created');fs.stat(file,function(err,stat){t.ifError(err);process.chdir(cwd);t.equal(stat.mode&0777,0755);t.ok(stat.isDirectory(),'target not a directory');})})});});