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 @@ -18,6 +18,7 @@ const {
18
18
ftruncate,
19
19
futimes,
20
20
link,
21
+ lchmod,
21
22
lstat,
22
23
mkdir,
23
24
mkdtemp,
@@ -160,14 +161,21 @@ function verifyStatObject(stat) {
160
161
if ( common . canCreateSymLink ( ) ) {
161
162
const newLink = path . resolve ( tmpDir , 'baz3.js' ) ;
162
163
await symlink ( newPath , newLink ) ;
163
-
164
164
stats = await lstat ( newLink ) ;
165
165
verifyStatObject ( stats ) ;
166
166
167
167
assert . strictEqual ( newPath . toLowerCase ( ) ,
168
168
( await realpath ( newLink ) ) . toLowerCase ( ) ) ;
169
169
assert . strictEqual ( newPath . toLowerCase ( ) ,
170
170
( await readlink ( newLink ) ) . toLowerCase ( ) ) ;
171
+ if ( common . isOSX ) {
172
+ // lchmod is only available on macOS
173
+ const newMode = 0o666 ;
174
+ await lchmod ( newLink , newMode ) ;
175
+ stats = await lstat ( newLink ) ;
176
+ assert . strictEqual ( stats . mode & 0o777 , newMode ) ;
177
+ }
178
+
171
179
172
180
await unlink ( newLink ) ;
173
181
}
You can’t perform that action at this time.
0 commit comments