File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -451,14 +451,19 @@ def test_delete_rpath
451
451
file = MachO ::MachOFile . new ( filename )
452
452
453
453
refute_empty file . rpaths
454
- orig_ncmds = file . ncmds
454
+ orig_ncmds = current_ncmds = file . ncmds
455
455
orig_sizeofcmds = file . sizeofcmds
456
- orig_npaths = file . rpaths . size
456
+ orig_npaths = current_npaths = file . rpaths . size
457
457
458
- file . rpaths . each { |rpath | file . delete_rpath ( rpath ) }
459
- assert_operator file . ncmds , :< , orig_ncmds
460
- assert_operator file . sizeofcmds , :< , orig_sizeofcmds
461
- assert_operator file . rpaths . size , :< , orig_npaths
458
+ file . rpaths . each do |rpath |
459
+ file . delete_rpath ( rpath )
460
+ current_npaths -= 1
461
+ current_ncmds -= 1
462
+
463
+ assert_equal file . ncmds , current_ncmds
464
+ assert_equal file . rpaths . size , current_npaths
465
+ assert_operator file . sizeofcmds , :< , orig_sizeofcmds
466
+ end
462
467
463
468
file . write ( actual )
464
469
# ensure we can actually re-load and parse the modified file
You can’t perform that action at this time.
0 commit comments