File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,16 @@ fs.lstat(fn, common.mustCall((err) => {
64
64
} ) ) ;
65
65
}
66
66
67
+ fs . realpath ( fn , common . mustCall ( ( err ) => {
68
+ assert . strictEqual ( fn , err . path ) ;
69
+ assert . strictEqual (
70
+ err . message ,
71
+ `ENOENT: no such file or directory, lstat '${ fn } '` ) ;
72
+ assert . strictEqual ( err . errno , uv . UV_ENOENT ) ;
73
+ assert . strictEqual ( err . code , 'ENOENT' ) ;
74
+ assert . strictEqual ( err . syscall , 'lstat' ) ;
75
+ } ) ) ;
76
+
67
77
fs . readlink ( fn , common . mustCall ( ( err ) => {
68
78
assert . ok ( err . message . includes ( fn ) ) ;
69
79
} ) ) ;
@@ -181,6 +191,20 @@ try {
181
191
assert . strictEqual ( err . syscall , 'fstat' ) ;
182
192
}
183
193
194
+ try {
195
+ ++ expected ;
196
+ fs . realpathSync ( fn ) ;
197
+ } catch ( err ) {
198
+ errors . push ( 'realpath' ) ;
199
+ assert . strictEqual ( fn , err . path ) ;
200
+ assert . strictEqual (
201
+ err . message ,
202
+ `ENOENT: no such file or directory, lstat '${ fn } '` ) ;
203
+ assert . strictEqual ( err . errno , uv . UV_ENOENT ) ;
204
+ assert . strictEqual ( err . code , 'ENOENT' ) ;
205
+ assert . strictEqual ( err . syscall , 'lstat' ) ;
206
+ }
207
+
184
208
try {
185
209
++ expected ;
186
210
fs . readlinkSync ( fn ) ;
You can’t perform that action at this time.
0 commit comments