File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const {
12
12
chmod,
13
13
copyFile,
14
14
link,
15
+ lchmod,
15
16
lstat,
16
17
mkdir,
17
18
mkdtemp,
@@ -129,14 +130,21 @@ function verifyStatObject(stat) {
129
130
if ( common . canCreateSymLink ( ) ) {
130
131
const newLink = path . resolve ( tmpDir , 'baz3.js' ) ;
131
132
await symlink ( newPath , newLink ) ;
132
-
133
133
stats = await lstat ( newLink ) ;
134
134
verifyStatObject ( stats ) ;
135
135
136
136
assert . strictEqual ( newPath . toLowerCase ( ) ,
137
137
( await realpath ( newLink ) ) . toLowerCase ( ) ) ;
138
138
assert . strictEqual ( newPath . toLowerCase ( ) ,
139
139
( await readlink ( newLink ) ) . toLowerCase ( ) ) ;
140
+ if ( common . isOSX ) {
141
+ // lchmod is only available on macOS
142
+ const newMode = 0o666 ;
143
+ await lchmod ( newLink , newMode ) ;
144
+ stats = await lstat ( newLink ) ;
145
+ assert . strictEqual ( stats . mode & 0o777 , newMode ) ;
146
+ }
147
+
140
148
141
149
await unlink ( newLink ) ;
142
150
}
You can’t perform that action at this time.
0 commit comments