@@ -7,20 +7,21 @@ const _0777 = parseInt('0777', 8);
77
88test . setup ( ) ;
99
10- describe ( 'umask' , ( ) => {
11- it ( "implicit mode from umask" , ( ) => {
12- const x = Math . floor ( Math . random ( ) * Math . pow ( 16 , 4 ) ) . toString ( 16 ) ;
13- const y = Math . floor ( Math . random ( ) * Math . pow ( 16 , 4 ) ) . toString ( 16 ) ;
14- const z = Math . floor ( Math . random ( ) * Math . pow ( 16 , 4 ) ) . toString ( 16 ) ;
10+ if ( process . platform !== 'win32' ) {
11+ describe ( 'umask' , ( ) => {
12+ it ( "implicit mode from umask" , ( ) => {
13+ const x = Math . floor ( Math . random ( ) * Math . pow ( 16 , 4 ) ) . toString ( 16 ) ;
14+ const y = Math . floor ( Math . random ( ) * Math . pow ( 16 , 4 ) ) . toString ( 16 ) ;
15+ const z = Math . floor ( Math . random ( ) * Math . pow ( 16 , 4 ) ) . toString ( 16 ) ;
1516
16- const file = path . join ( __dirname , 'tmp/' + [ x , y , z ] . join ( '/' ) ) ;
17+ const file = path . join ( __dirname , 'tmp/' + [ x , y , z ] . join ( '/' ) ) ;
1718
18- mkdirp ( file ) ;
19- assert . ok ( fs . exists ( file ) , 'file created' ) ;
20- const stat = fs . stat ( file ) ;
21- assert . equal ( stat . mode & _0777 , _0777 & ( ~ process . umask ( ) ) ) ;
22- assert . ok ( stat . isDirectory ( ) , 'target is a directory' ) ;
19+ mkdirp ( file ) ;
20+ assert . ok ( fs . exists ( file ) , 'file created' ) ;
21+ const stat = fs . stat ( file ) ;
22+ assert . equal ( stat . mode & _0777 , _0777 & ( ~ process . umask ( ) ) ) ;
23+ assert . ok ( stat . isDirectory ( ) , 'target is a directory' ) ;
24+ } ) ;
2325 } ) ;
24- } ) ;
25-
26+ }
2627//test.run(console.DEBUG);
0 commit comments