diff options
Diffstat (limited to 'Library/Homebrew/test/test_cleaner.rb')
| -rw-r--r-- | Library/Homebrew/test/test_cleaner.rb | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/Library/Homebrew/test/test_cleaner.rb b/Library/Homebrew/test/test_cleaner.rb index ce297fc7d..1b214c2d1 100644 --- a/Library/Homebrew/test/test_cleaner.rb +++ b/Library/Homebrew/test/test_cleaner.rb @@ -1,12 +1,12 @@ -require 'testing_env' -require 'cleaner' -require 'formula' +require "testing_env" +require "cleaner" +require "formula" class CleanerTests < Homebrew::TestCase include FileUtils def setup - @f = formula("cleaner_test") { url 'foo-1.0' } + @f = formula("cleaner_test") { url "foo-1.0" } @f.prefix.mkpath end @@ -22,10 +22,10 @@ class CleanerTests < Homebrew::TestCase Cleaner.new(@f).clean - assert_equal 0100555, (@f.bin/'a.out').stat.mode - assert_equal 0100444, (@f.lib/'fat.dylib').stat.mode - assert_equal 0100444, (@f.lib/'x86_64.dylib').stat.mode - assert_equal 0100444, (@f.lib/'i386.dylib').stat.mode + assert_equal 0100555, (@f.bin/"a.out").stat.mode + assert_equal 0100444, (@f.lib/"fat.dylib").stat.mode + assert_equal 0100444, (@f.lib/"x86_64.dylib").stat.mode + assert_equal 0100444, (@f.lib/"i386.dylib").stat.mode end def test_prunes_prefix_if_empty @@ -34,7 +34,7 @@ class CleanerTests < Homebrew::TestCase end def test_prunes_empty_directories - subdir = @f.bin/'subdir' + subdir = @f.bin/"subdir" subdir.mkpath Cleaner.new(@f).clean @@ -44,7 +44,7 @@ class CleanerTests < Homebrew::TestCase end def test_skip_clean_empty_directory - @f.class.skip_clean 'bin' + @f.class.skip_clean "bin" @f.bin.mkpath Cleaner.new(@f).clean @@ -53,8 +53,8 @@ class CleanerTests < Homebrew::TestCase end def test_skip_clean_directory_with_empty_subdir - @f.class.skip_clean 'bin' - subdir = @f.bin/'subdir' + @f.class.skip_clean "bin" + subdir = @f.bin/"subdir" subdir.mkpath Cleaner.new(@f).clean @@ -64,8 +64,8 @@ class CleanerTests < Homebrew::TestCase end def test_removes_symlink_when_target_was_pruned_first - dir = @f.prefix/'b' - symlink = @f.prefix/'a' + dir = @f.prefix/"b" + symlink = @f.prefix/"a" dir.mkpath ln_s dir.basename, symlink @@ -78,8 +78,8 @@ class CleanerTests < Homebrew::TestCase end def test_removes_symlink_pointing_to_empty_directory - dir = @f.prefix/'b' - symlink = @f.prefix/'c' + dir = @f.prefix/"b" + symlink = @f.prefix/"c" dir.mkpath ln_s dir.basename, symlink @@ -92,8 +92,8 @@ class CleanerTests < Homebrew::TestCase end def test_removes_broken_symlinks - symlink = @f.prefix/'symlink' - ln_s 'target', symlink + symlink = @f.prefix/"symlink" + ln_s "target", symlink Cleaner.new(@f).clean @@ -101,9 +101,9 @@ class CleanerTests < Homebrew::TestCase end def test_skip_clean_broken_symlink - @f.class.skip_clean 'symlink' - symlink = @f.prefix/'symlink' - ln_s 'target', symlink + @f.class.skip_clean "symlink" + symlink = @f.prefix/"symlink" + ln_s "target", symlink Cleaner.new(@f).clean @@ -111,9 +111,9 @@ class CleanerTests < Homebrew::TestCase end def test_skip_clean_symlink_pointing_to_empty_directory - @f.class.skip_clean 'c' - dir = @f.prefix/'b' - symlink = @f.prefix/'c' + @f.class.skip_clean "c" + dir = @f.prefix/"b" + symlink = @f.prefix/"c" dir.mkpath ln_s dir.basename, symlink @@ -126,9 +126,9 @@ class CleanerTests < Homebrew::TestCase end def test_skip_clean_symlink_when_target_pruned - @f.class.skip_clean 'a' - dir = @f.prefix/'b' - symlink = @f.prefix/'a' + @f.class.skip_clean "a" + dir = @f.prefix/"b" + symlink = @f.prefix/"a" dir.mkpath ln_s dir.basename, symlink @@ -141,7 +141,7 @@ class CleanerTests < Homebrew::TestCase end def test_removes_la_files - file = @f.lib/'foo.la' + file = @f.lib/"foo.la" @f.lib.mkpath touch file @@ -152,7 +152,7 @@ class CleanerTests < Homebrew::TestCase end def test_skip_clean_la - file = @f.lib/'foo.la' + file = @f.lib/"foo.la" @f.class.skip_clean :la @f.lib.mkpath @@ -164,7 +164,7 @@ class CleanerTests < Homebrew::TestCase end def test_remove_charset_alias - file = @f.lib/'charset.alias' + file = @f.lib/"charset.alias" @f.lib.mkpath touch file @@ -175,8 +175,8 @@ class CleanerTests < Homebrew::TestCase end def test_skip_clean_subdir - dir = @f.lib/'subdir' - @f.class.skip_clean 'lib/subdir' + dir = @f.lib/"subdir" + @f.class.skip_clean "lib/subdir" dir.mkpath @@ -186,10 +186,10 @@ class CleanerTests < Homebrew::TestCase end def test_skip_clean_paths_are_anchored_to_prefix - dir1 = @f.bin/'a' - dir2 = @f.lib/'bin/a' + dir1 = @f.bin/"a" + dir2 = @f.lib/"bin/a" - @f.class.skip_clean 'bin/a' + @f.class.skip_clean "bin/a" dir1.mkpath dir2.mkpath |
