@@ -390,211 +390,70 @@ void main() {
390
390
);
391
391
});
392
392
393
- test (
394
- 'Missing NSBonjourServices key in Info.plist should not fail Xcode compilation, and no plutil error in stdout without verbose mode' ,
395
- () {
396
- final Directory buildDir = fileSystem.directory ('/path/to/builds' )
397
- ..createSync (recursive: true );
398
- final File infoPlist = buildDir.childFile ('Info.plist' )..createSync ();
399
- const plutilErrorMessage =
400
- 'Could not extract value, error: No value at that key path or invalid key path: NSBonjourServices' ;
401
-
402
- final context = TestContext (
403
- < String > ['test_vm_service_bonjour_service' ],
404
- < String , String > {
405
- 'CONFIGURATION' : 'Debug' ,
406
- 'BUILT_PRODUCTS_DIR' : buildDir.path,
407
- 'INFOPLIST_PATH' : 'Info.plist' ,
408
- },
409
- commands: < FakeCommand > [
410
- FakeCommand (
411
- command: < String > [
412
- 'plutil' ,
413
- '-extract' ,
414
- 'NSBonjourServices' ,
415
- 'xml1' ,
416
- '-o' ,
417
- '-' ,
418
- infoPlist.path,
419
- ],
420
- exitCode: 1 ,
421
- stderr: plutilErrorMessage,
422
- ),
423
- FakeCommand (
424
- command: < String > [
425
- 'plutil' ,
426
- '-insert' ,
427
- 'NSBonjourServices' ,
428
- '-json' ,
429
- '["_dartVmService._tcp"]' ,
430
- infoPlist.path,
431
- ],
432
- ),
433
- FakeCommand (
434
- command: < String > [
435
- 'plutil' ,
436
- '-extract' ,
437
- 'NSLocalNetworkUsageDescription' ,
438
- 'xml1' ,
439
- '-o' ,
440
- '-' ,
441
- infoPlist.path,
442
- ],
443
- ),
444
- ],
445
- fileSystem: fileSystem,
446
- )..run ();
447
- expect (context.stderr, isNot (startsWith ('error: ' )));
448
- expect (context.stderr, isNot (contains (plutilErrorMessage)));
449
- expect (context.stdout, isNot (contains (plutilErrorMessage)));
450
- },
451
- );
452
-
453
- test (
454
- 'Missing NSBonjourServices key in Info.plist should not fail Xcode compilation, and has plutil error in stdout under verbose mode' ,
455
- () {
456
- final Directory buildDir = fileSystem.directory ('/path/to/builds' )
457
- ..createSync (recursive: true );
458
- final File infoPlist = buildDir.childFile ('Info.plist' )..createSync ();
459
- const plutilErrorMessage =
460
- 'Could not extract value, error: No value at that key path or invalid key path: NSBonjourServices' ;
461
-
462
- final context = TestContext (
463
- < String > ['test_vm_service_bonjour_service' ],
464
- < String , String > {
465
- 'CONFIGURATION' : 'Debug' ,
466
- 'BUILT_PRODUCTS_DIR' : buildDir.path,
467
- 'INFOPLIST_PATH' : 'Info.plist' ,
468
- 'VERBOSE_SCRIPT_LOGGING' : 'YES' ,
469
- },
470
- commands: < FakeCommand > [
471
- FakeCommand (
472
- command: < String > [
473
- 'plutil' ,
474
- '-extract' ,
475
- 'NSBonjourServices' ,
476
- 'xml1' ,
477
- '-o' ,
478
- '-' ,
479
- infoPlist.path,
480
- ],
481
- exitCode: 1 ,
482
- stderr: plutilErrorMessage,
483
- ),
484
- FakeCommand (
485
- command: < String > [
486
- 'plutil' ,
487
- '-insert' ,
488
- 'NSBonjourServices' ,
489
- '-json' ,
490
- '["_dartVmService._tcp"]' ,
491
- infoPlist.path,
492
- ],
493
- ),
494
- FakeCommand (
495
- command: < String > [
496
- 'plutil' ,
497
- '-extract' ,
498
- 'NSLocalNetworkUsageDescription' ,
499
- 'xml1' ,
500
- '-o' ,
501
- '-' ,
502
- infoPlist.path,
503
- ],
504
- ),
505
- ],
506
- fileSystem: fileSystem,
507
- )..run ();
508
- expect (context.stderr, isNot (startsWith ('error: ' )));
509
- expect (context.stderr, isNot (contains (plutilErrorMessage)));
510
- expect (context.stdout, contains (plutilErrorMessage));
511
- },
512
- );
513
-
514
- test (
515
- 'Missing NSLocalNetworkUsageDescription in Info.plist should not fail Xcode compilation, and no plutil error in stdout without verbose mode' ,
516
- () {
517
- final Directory buildDir = fileSystem.directory ('/path/to/builds' )
518
- ..createSync (recursive: true );
519
- final File infoPlist = buildDir.childFile ('Info.plist' )..createSync ();
520
- const plutilErrorMessage =
521
- 'Could not extract value, error: No value at that key path or invalid key path: NSLocalNetworkUsageDescription' ;
522
- final context = TestContext (
523
- < String > ['test_vm_service_bonjour_service' ],
524
- < String , String > {
525
- 'CONFIGURATION' : 'Debug' ,
526
- 'BUILT_PRODUCTS_DIR' : buildDir.path,
527
- 'INFOPLIST_PATH' : 'Info.plist' ,
528
- },
529
- commands: < FakeCommand > [
530
- FakeCommand (
531
- command: < String > [
532
- 'plutil' ,
533
- '-extract' ,
534
- 'NSBonjourServices' ,
535
- 'xml1' ,
536
- '-o' ,
537
- '-' ,
538
- infoPlist.path,
539
- ],
540
- ),
541
- FakeCommand (
542
- command: < String > [
543
- 'plutil' ,
544
- '-insert' ,
545
- 'NSBonjourServices.0' ,
546
- '-string' ,
547
- '_dartVmService._tcp' ,
548
- infoPlist.path,
549
- ],
550
- ),
551
- FakeCommand (
552
- command: < String > [
553
- 'plutil' ,
554
- '-extract' ,
555
- 'NSLocalNetworkUsageDescription' ,
556
- 'xml1' ,
557
- '-o' ,
558
- '-' ,
559
- infoPlist.path,
560
- ],
561
- exitCode: 1 ,
562
- stderr: plutilErrorMessage,
563
- ),
564
- FakeCommand (
565
- command: < String > [
566
- 'plutil' ,
567
- '-insert' ,
568
- 'NSLocalNetworkUsageDescription' ,
569
- '-string' ,
570
- 'Allow Flutter tools on your computer to connect and debug your application. This prompt will not appear on release builds.' ,
571
- infoPlist.path,
572
- ],
573
- ),
574
- ],
575
- fileSystem: fileSystem,
576
- )..run ();
577
- expect (context.stderr, isNot (startsWith ('error: ' )));
578
- expect (context.stderr, isNot (contains (plutilErrorMessage)));
579
- expect (context.stdout, isNot (contains (plutilErrorMessage)));
580
- },
581
- );
393
+ test ('Missing NSBonjourServices key in Info.plist should not fail Xcode compilation' , () {
394
+ final Directory buildDir = fileSystem.directory ('/path/to/builds' )
395
+ ..createSync (recursive: true );
396
+ final File infoPlist = buildDir.childFile ('Info.plist' )..createSync ();
397
+ final context = TestContext (
398
+ < String > ['test_vm_service_bonjour_service' ],
399
+ < String , String > {
400
+ 'CONFIGURATION' : 'Debug' ,
401
+ 'BUILT_PRODUCTS_DIR' : buildDir.path,
402
+ 'INFOPLIST_PATH' : 'Info.plist' ,
403
+ },
404
+ commands: < FakeCommand > [
405
+ FakeCommand (
406
+ command: < String > [
407
+ 'plutil' ,
408
+ '-extract' ,
409
+ 'NSBonjourServices' ,
410
+ 'xml1' ,
411
+ '-o' ,
412
+ '-' ,
413
+ infoPlist.path,
414
+ ],
415
+ exitCode: 1 ,
416
+ stderr: 'No value at that key path or invalid key path: NSBonjourServices' ,
417
+ ),
418
+ FakeCommand (
419
+ command: < String > [
420
+ 'plutil' ,
421
+ '-insert' ,
422
+ 'NSBonjourServices' ,
423
+ '-json' ,
424
+ '["_dartVmService._tcp"]' ,
425
+ infoPlist.path,
426
+ ],
427
+ ),
428
+ FakeCommand (
429
+ command: < String > [
430
+ 'plutil' ,
431
+ '-extract' ,
432
+ 'NSLocalNetworkUsageDescription' ,
433
+ 'xml1' ,
434
+ '-o' ,
435
+ '-' ,
436
+ infoPlist.path,
437
+ ],
438
+ ),
439
+ ],
440
+ fileSystem: fileSystem,
441
+ )..run ();
442
+ expect (context.stderr, isNot (contains ('error: ' )));
443
+ });
582
444
583
445
test (
584
- 'Missing NSLocalNetworkUsageDescription in Info.plist should not fail Xcode compilation, and has plutil error in stdout under verbose mode ' ,
446
+ 'Missing NSLocalNetworkUsageDescription in Info.plist should not fail Xcode compilation' ,
585
447
() {
586
448
final Directory buildDir = fileSystem.directory ('/path/to/builds' )
587
449
..createSync (recursive: true );
588
450
final File infoPlist = buildDir.childFile ('Info.plist' )..createSync ();
589
- const plutilErrorMessage =
590
- 'Could not extract value, error: No value at that key path or invalid key path: NSLocalNetworkUsageDescription' ;
591
451
final context = TestContext (
592
452
< String > ['test_vm_service_bonjour_service' ],
593
453
< String , String > {
594
454
'CONFIGURATION' : 'Debug' ,
595
455
'BUILT_PRODUCTS_DIR' : buildDir.path,
596
456
'INFOPLIST_PATH' : 'Info.plist' ,
597
- 'VERBOSE_SCRIPT_LOGGING' : 'YES' ,
598
457
},
599
458
commands: < FakeCommand > [
600
459
FakeCommand (
@@ -629,7 +488,8 @@ void main() {
629
488
infoPlist.path,
630
489
],
631
490
exitCode: 1 ,
632
- stderr: plutilErrorMessage,
491
+ stderr:
492
+ 'No value at that key path or invalid key path: NSLocalNetworkUsageDescription' ,
633
493
),
634
494
FakeCommand (
635
495
command: < String > [
@@ -644,9 +504,7 @@ void main() {
644
504
],
645
505
fileSystem: fileSystem,
646
506
)..run ();
647
- expect (context.stderr, isNot (startsWith ('error: ' )));
648
- expect (context.stderr, isNot (contains (plutilErrorMessage)));
649
- expect (context.stdout, contains (plutilErrorMessage));
507
+ expect (context.stderr, isNot (contains ('error: ' )));
650
508
},
651
509
);
652
510
});
0 commit comments