File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,21 @@ describe("adm-zip", () => {
172172 const zip2Entries = zip2 . getEntries ( ) . map ( ( e ) => e . entryName ) ;
173173 expect ( zip2Entries ) . to . deep . equal ( [ "c.txt" , "b.txt" , "a.txt" ] ) ;
174174 } ) ;
175+
176+ it ( "repro: symlink" , ( ) => {
177+ const zip = new Zip ( "./test/assets/symlink.zip" ) ;
178+ zip . extractAllTo ( destination ) ;
179+
180+ const linkPath = pth . join ( destination , "link" )
181+ const linkStat = fs . lstatSync ( linkPath ) ;
182+ expect ( linkStat . isSymbolicLink ( ) ) . to . be . true ;
183+
184+ const linkTarget = fs . readlinkSync ( linkPath ) ;
185+ expect ( linkTarget ) . to . equal ( "target" )
186+
187+ const linkContent = fs . readFileSync ( linkPath ) ;
188+ expect ( linkContent ) . to . equal ( "diddlydiddly doo, i'm a linkaroo" )
189+ } ) ;
175190} ) ;
176191
177192function walk ( dir ) {
You can’t perform that action at this time.
0 commit comments