diff options
| author | Baptiste Fontaine | 2016-01-08 17:54:22 +0100 |
|---|---|---|
| committer | Baptiste Fontaine | 2016-01-09 10:37:29 +0100 |
| commit | beb80c605fdbf1f8b958ba1268173dc415b47850 (patch) | |
| tree | 3b2d25ca5af226e5a0fc81224813d8abf5d33daf /Library/Homebrew | |
| parent | 91d4ba7158f3d8fc32b2a668cd1153a0d6971087 (diff) | |
| download | brew-beb80c605fdbf1f8b958ba1268173dc415b47850.tar.bz2 | |
more diagnostic tests
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/test/test_diagnostic.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_diagnostic.rb b/Library/Homebrew/test/test_diagnostic.rb index c4b61e917..8aa2c6f67 100644 --- a/Library/Homebrew/test/test_diagnostic.rb +++ b/Library/Homebrew/test/test_diagnostic.rb @@ -13,6 +13,13 @@ class DiagnosticChecksTest < Homebrew::TestCase ENV.replace(@env) end + def test_inject_file_list + assert_equal "foo:\n", + @checks.inject_file_list([], "foo:\n") + assert_equal "foo:\n /a\n /b\n", + @checks.inject_file_list(%w[/a /b], "foo:\n") + end + def test_check_path_for_trailing_slashes ENV["PATH"] += File::PATH_SEPARATOR + "/foo/bar/" assert_match "Some directories in your path end in a slash", @@ -37,6 +44,19 @@ class DiagnosticChecksTest < Homebrew::TestCase end end + def test_check_for_other_package_managers + MacOS.stubs(:macports_or_fink).returns ["fink"] + assert_match "You have MacPorts or Fink installed:", + @checks.check_for_other_package_managers + end + + def test_check_for_unsupported_osx + ARGV.stubs(:homebrew_developer?).returns false + OS::Mac.stubs(:prerelease?).returns true + assert_match "We do not provide support for this pre-release version.", + @checks.check_for_unsupported_osx + end + def test_check_access_homebrew_repository mod = HOMEBREW_REPOSITORY.stat.mode & 0777 HOMEBREW_REPOSITORY.chmod 0555 |
