Skip to content

Commit

Permalink
Revert "test: Add test for Keg#mach_o_files hardlink behavior."
Browse files Browse the repository at this point in the history
This reverts commit 62d7079.
  • Loading branch information
tdsmith committed Jun 28, 2016
1 parent 62d7079 commit 70ceb85
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
15 changes: 0 additions & 15 deletions Library/Homebrew/test/test_keg.rb
Expand Up @@ -304,19 +304,4 @@ def test_removes_broken_symlinks_that_conflict_with_directories
keg.unlink
keg.uninstall
end

def test_mach_o_files_skips_hardlinks
a = HOMEBREW_CELLAR.join("a", "1.0")
a.join("lib").mkpath
FileUtils.cp dylib_path("i386"), a.join("lib", "i386.dylib")
FileUtils.ln a.join("lib", "i386.dylib"), a.join("lib", "i386_link.dylib")

keg = Keg.new(a)
keg.link

assert_equal 1, keg.mach_o_files.size
ensure
keg.unlink
keg.uninstall
end
end
8 changes: 8 additions & 0 deletions Library/Homebrew/test/test_mach.rb
@@ -1,6 +1,14 @@
require "testing_env"

class MachOPathnameTests < Homebrew::TestCase
def dylib_path(name)
Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
end

def bundle_path(name)
Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
end

def test_fat_dylib
pn = dylib_path("fat")
assert_predicate pn, :universal?
Expand Down
8 changes: 0 additions & 8 deletions Library/Homebrew/test/testing_env.rb
Expand Up @@ -112,13 +112,5 @@ def refute_eql(exp, act, msg = nil)
}
refute exp.eql?(act), msg
end

def dylib_path(name)
Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.dylib")
end

def bundle_path(name)
Pathname.new("#{TEST_DIRECTORY}/mach/#{name}.bundle")
end
end
end

0 comments on commit 70ceb85

Please sign in to comment.