@@ -376,10 +376,10 @@ t.test('if gzip is truthy, make it an object', t => {
376
376
} )
377
377
378
378
t . test ( 'if brotli is truthy, make it an object' , t => {
379
- const opt = { brotli : true }
380
- new Pack ( opt )
381
- t . type ( opt . brotli , 'object' )
382
- t . end ( )
379
+ const opt = { brotli : true }
380
+ new Pack ( opt )
381
+ t . type ( opt . brotli , 'object' )
382
+ t . end ( )
383
383
} )
384
384
385
385
t . test ( 'gzip, also a very deep path' , t => {
@@ -462,82 +462,81 @@ t.test('gzip, also a very deep path', t => {
462
462
} )
463
463
464
464
t . test ( 'brotli, also a very deep path' , t => {
465
- const out = [ ]
465
+ const out = [ ]
466
466
467
- new Pack ( {
468
- cwd : files ,
469
- brotli : { flush : 1 } ,
470
- } )
471
- . add ( 'dir' )
472
- . add ( 'long-path' )
473
- . on ( 'data' , c => out . push ( c ) )
474
- . end ( )
475
- . on ( 'end' , _ => {
476
- const zipped = Buffer . concat ( out )
477
- const data = zlib . brotliDecompressSync ( zipped )
478
- const entries = [ ]
479
- for ( var i = 0 ; i < data . length ; i += 512 ) {
480
- const slice = data . slice ( i , i + 512 )
481
- const h = new Header ( slice )
482
- if ( h . nullBlock ) {
483
- entries . push ( 'null block' )
484
- } else if ( h . cksumValid ) {
485
- entries . push ( [ h . type , h . path ] )
486
- } else if ( entries [ entries . length - 1 ] [ 0 ] === 'File' ) {
487
- entries [ entries . length - 1 ] . push ( slice . toString ( ) . replace ( / \0 .* $ / , '' ) )
488
- }
489
- }
490
-
491
- const expect = [
492
- [ 'Directory' , 'dir/' ] ,
493
- [ 'Directory' , 'long-path/' ] ,
494
- [ 'File' , 'dir/x' ] ,
495
- [ 'Directory' , 'long-path/r/' ] ,
496
- [ 'Directory' , 'long-path/r/e/' ] ,
497
- [ 'Directory' , 'long-path/r/e/a/' ] ,
498
- [ 'Directory' , 'long-path/r/e/a/l/' ] ,
499
- [ 'Directory' , 'long-path/r/e/a/l/l/' ] ,
500
- [ 'Directory' , 'long-path/r/e/a/l/l/y/' ] ,
501
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/' ] ,
502
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/' ] ,
503
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/' ] ,
504
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/' ] ,
505
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/' ] ,
506
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/' ] ,
507
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/' ] ,
508
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/' ] ,
509
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/' ] ,
510
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/' ] ,
511
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/' ] ,
512
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/' ] ,
513
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/' ] ,
514
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/' ] ,
515
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/' ] ,
516
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/' ] ,
517
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/' ] ,
518
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/a.txt' , 'short\n' ] ,
519
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' , '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' ] ,
520
- [ 'ExtendedHeader' , 'PaxHeader/ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ] ,
521
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' , '2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222' ] ,
522
- [ 'ExtendedHeader' , 'PaxHeader/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccccccccccccccccccccccccccccccc' ] ,
523
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccccccccccccccccccccccccccccccccccccccccc' , 'cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ] ,
524
- [ 'ExtendedHeader' , 'PaxHeader/Ω.txt' ] ,
525
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/Ω.txt' , 'Ω' ] ,
526
- 'null block' ,
527
- 'null block' ,
528
- ]
529
-
530
- let ok = true
531
- entries . forEach ( ( entry , i ) => {
532
- ok = ok &&
467
+ new Pack ( {
468
+ cwd : files ,
469
+ brotli : { flush : 1 } ,
470
+ } )
471
+ . add ( 'dir' )
472
+ . add ( 'long-path' )
473
+ . on ( 'data' , c => out . push ( c ) )
474
+ . end ( )
475
+ . on ( 'end' , _ => {
476
+ const zipped = Buffer . concat ( out )
477
+ const data = zlib . brotliDecompressSync ( zipped )
478
+ const entries = [ ]
479
+ for ( var i = 0 ; i < data . length ; i += 512 ) {
480
+ const slice = data . slice ( i , i + 512 )
481
+ const h = new Header ( slice )
482
+ if ( h . nullBlock ) {
483
+ entries . push ( 'null block' )
484
+ } else if ( h . cksumValid ) {
485
+ entries . push ( [ h . type , h . path ] )
486
+ } else if ( entries [ entries . length - 1 ] [ 0 ] === 'File' ) {
487
+ entries [ entries . length - 1 ] . push ( slice . toString ( ) . replace ( / \0 .* $ / , '' ) )
488
+ }
489
+ }
490
+
491
+ const expect = [
492
+ [ 'Directory' , 'dir/' ] ,
493
+ [ 'Directory' , 'long-path/' ] ,
494
+ [ 'File' , 'dir/x' ] ,
495
+ [ 'Directory' , 'long-path/r/' ] ,
496
+ [ 'Directory' , 'long-path/r/e/' ] ,
497
+ [ 'Directory' , 'long-path/r/e/a/' ] ,
498
+ [ 'Directory' , 'long-path/r/e/a/l/' ] ,
499
+ [ 'Directory' , 'long-path/r/e/a/l/l/' ] ,
500
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/' ] ,
501
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/' ] ,
502
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/' ] ,
503
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/' ] ,
504
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/' ] ,
505
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/' ] ,
506
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/' ] ,
507
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/' ] ,
508
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/' ] ,
509
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/' ] ,
510
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/' ] ,
511
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/' ] ,
512
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/' ] ,
513
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/' ] ,
514
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/' ] ,
515
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/' ] ,
516
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/' ] ,
517
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/' ] ,
518
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/a.txt' , 'short\n' ] ,
519
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' , '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' ] ,
520
+ [ 'ExtendedHeader' , 'PaxHeader/ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ] ,
521
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' , '2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222' ] ,
522
+ [ 'ExtendedHeader' , 'PaxHeader/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccccccccccccccccccccccccccccccc' ] ,
523
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccccccccccccccccccccccccccccccccccccccccc' , 'cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ] ,
524
+ [ 'ExtendedHeader' , 'PaxHeader/Ω.txt' ] ,
525
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/Ω.txt' , 'Ω' ] ,
526
+ 'null block' ,
527
+ 'null block' ,
528
+ ]
529
+
530
+ let ok = true
531
+ entries . forEach ( ( entry , i ) => {
532
+ ok = ok &&
533
533
t . equal ( entry [ 0 ] , expect [ i ] [ 0 ] ) &&
534
534
t . equal ( entry [ 1 ] , expect [ i ] [ 1 ] ) &&
535
535
( ! entry [ 2 ] || t . equal ( entry [ 2 ] , expect [ i ] [ 2 ] ) )
536
- } )
536
+ } )
537
537
538
- // t.match(entries, expect)
539
- t . end ( )
540
- } )
538
+ t . end ( )
539
+ } )
541
540
} )
542
541
543
542
t . test ( 'very deep gzip path, sync' , t => {
@@ -620,82 +619,81 @@ t.test('very deep gzip path, sync', t => {
620
619
} )
621
620
622
621
t . test ( 'very deep brotli path, sync' , t => {
623
- const pack = new PackSync ( {
624
- cwd : files ,
625
- brotli : true ,
626
- } ) . add ( 'dir' )
627
- . add ( 'long-path' )
628
- . end ( )
629
-
630
- // these do nothing!
631
- pack . pause ( )
632
- pack . resume ( )
633
-
634
- const zipped = pack . read ( )
635
- t . type ( zipped , Buffer )
636
- const data = zlib . brotliDecompressSync ( zipped )
637
- const entries = [ ]
638
- for ( var i = 0 ; i < data . length ; i += 512 ) {
639
- const slice = data . slice ( i , i + 512 )
640
- const h = new Header ( slice )
641
- if ( h . nullBlock ) {
642
- entries . push ( 'null block' )
643
- } else if ( h . cksumValid ) {
644
- entries . push ( [ h . type , h . path ] )
645
- } else if ( entries [ entries . length - 1 ] [ 0 ] === 'File' ) {
646
- entries [ entries . length - 1 ] . push ( slice . toString ( ) . replace ( / \0 .* $ / , '' ) )
647
- }
622
+ const pack = new PackSync ( {
623
+ cwd : files ,
624
+ brotli : true ,
625
+ } ) . add ( 'dir' )
626
+ . add ( 'long-path' )
627
+ . end ( )
628
+
629
+ // these do nothing!
630
+ pack . pause ( )
631
+ pack . resume ( )
632
+
633
+ const zipped = pack . read ( )
634
+ t . type ( zipped , Buffer )
635
+ const data = zlib . brotliDecompressSync ( zipped )
636
+ const entries = [ ]
637
+ for ( var i = 0 ; i < data . length ; i += 512 ) {
638
+ const slice = data . slice ( i , i + 512 )
639
+ const h = new Header ( slice )
640
+ if ( h . nullBlock ) {
641
+ entries . push ( 'null block' )
642
+ } else if ( h . cksumValid ) {
643
+ entries . push ( [ h . type , h . path ] )
644
+ } else if ( entries [ entries . length - 1 ] [ 0 ] === 'File' ) {
645
+ entries [ entries . length - 1 ] . push ( slice . toString ( ) . replace ( / \0 .* $ / , '' ) )
648
646
}
647
+ }
649
648
650
- const expect = [
651
- [ 'Directory' , 'dir/' ] ,
652
- [ 'File' , 'dir/x' ] ,
653
- [ 'Directory' , 'long-path/' ] ,
654
- [ 'Directory' , 'long-path/r/' ] ,
655
- [ 'Directory' , 'long-path/r/e/' ] ,
656
- [ 'Directory' , 'long-path/r/e/a/' ] ,
657
- [ 'Directory' , 'long-path/r/e/a/l/' ] ,
658
- [ 'Directory' , 'long-path/r/e/a/l/l/' ] ,
659
- [ 'Directory' , 'long-path/r/e/a/l/l/y/' ] ,
660
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/' ] ,
661
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/' ] ,
662
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/' ] ,
663
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/' ] ,
664
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/' ] ,
665
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/' ] ,
666
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/' ] ,
667
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/' ] ,
668
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/' ] ,
669
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/' ] ,
670
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/' ] ,
671
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/' ] ,
672
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/' ] ,
673
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/' ] ,
674
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/' ] ,
675
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/' ] ,
676
- [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/' ] ,
677
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/a.txt' , 'short\n' ] ,
678
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' , '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' ] ,
679
- [ 'ExtendedHeader' , 'PaxHeader/ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ] ,
680
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' , '2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222' ] ,
681
- [ 'ExtendedHeader' , 'PaxHeader/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccccccccccccccccccccccccccccccc' ] ,
682
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccccccccccccccccccccccccccccccccccccccccc' , 'cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ] ,
683
- [ 'ExtendedHeader' , 'PaxHeader/Ω.txt' ] ,
684
- [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/Ω.txt' , 'Ω' ] ,
685
- 'null block' ,
686
- 'null block' ,
687
- ]
649
+ const expect = [
650
+ [ 'Directory' , 'dir/' ] ,
651
+ [ 'File' , 'dir/x' ] ,
652
+ [ 'Directory' , 'long-path/' ] ,
653
+ [ 'Directory' , 'long-path/r/' ] ,
654
+ [ 'Directory' , 'long-path/r/e/' ] ,
655
+ [ 'Directory' , 'long-path/r/e/a/' ] ,
656
+ [ 'Directory' , 'long-path/r/e/a/l/' ] ,
657
+ [ 'Directory' , 'long-path/r/e/a/l/l/' ] ,
658
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/' ] ,
659
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/' ] ,
660
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/' ] ,
661
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/' ] ,
662
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/' ] ,
663
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/' ] ,
664
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/' ] ,
665
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/' ] ,
666
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/' ] ,
667
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/' ] ,
668
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/' ] ,
669
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/' ] ,
670
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/' ] ,
671
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/' ] ,
672
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/' ] ,
673
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/' ] ,
674
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/' ] ,
675
+ [ 'Directory' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/' ] ,
676
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/a.txt' , 'short\n' ] ,
677
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' , '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' ] ,
678
+ [ 'ExtendedHeader' , 'PaxHeader/ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ] ,
679
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' , '2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222' ] ,
680
+ [ 'ExtendedHeader' , 'PaxHeader/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccccccccccccccccccccccccccccccc' ] ,
681
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccccccccccccccccccccccccccccccccccccccccc' , 'cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ] ,
682
+ [ 'ExtendedHeader' , 'PaxHeader/Ω.txt' ] ,
683
+ [ 'File' , 'long-path/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/Ω.txt' , 'Ω' ] ,
684
+ 'null block' ,
685
+ 'null block' ,
686
+ ]
688
687
689
- let ok = true
690
- entries . forEach ( ( entry , i ) => {
691
- ok = ok &&
692
- t . equal ( entry [ 0 ] , expect [ i ] [ 0 ] ) &&
693
- t . equal ( entry [ 1 ] , expect [ i ] [ 1 ] ) &&
694
- ( ! entry [ 2 ] || t . equal ( entry [ 2 ] , expect [ i ] [ 2 ] ) )
695
- } )
688
+ let ok = true
689
+ entries . forEach ( ( entry , i ) => {
690
+ ok = ok &&
691
+ t . equal ( entry [ 0 ] , expect [ i ] [ 0 ] ) &&
692
+ t . equal ( entry [ 1 ] , expect [ i ] [ 1 ] ) &&
693
+ ( ! entry [ 2 ] || t . equal ( entry [ 2 ] , expect [ i ] [ 2 ] ) )
694
+ } )
696
695
697
- // t.match(entries, expect)
698
- t . end ( )
696
+ t . end ( )
699
697
} )
700
698
701
699
t . test ( 'write after end' , t => {
0 commit comments