aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2014-07-18 15:14:42 -0500
committerJack Nagel2014-07-18 15:15:12 -0500
commit49a97c280a35fe07bce036467da85ace0c006fa7 (patch)
treefc46a04bd185a762a3d779c0892bf3c474674cc0 /Library/Homebrew/test
parent1cc37470947ed594dbb42a4138b34d33c74cb17d (diff)
downloadbrew-49a97c280a35fe07bce036467da85ace0c006fa7.tar.bz2
Ask the filename object for the prefix
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_bottle_filename.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_bottle_filename.rb b/Library/Homebrew/test/test_bottle_filename.rb
index 09dc29e5f..cad538be9 100644
--- a/Library/Homebrew/test/test_bottle_filename.rb
+++ b/Library/Homebrew/test/test_bottle_filename.rb
@@ -6,6 +6,12 @@ class BottleFilenameTests < Homebrew::TestCase
Bottle::Filename.new("foo", "1.0", :tag, revision)
end
+ def test_prefix_suffix
+ assert_equal "foo-1.0.tag", fn(0).prefix
+ assert_equal ".bottle.tar.gz", fn(0).suffix
+ assert_equal ".bottle.1.tar.gz", fn(1).suffix
+ end
+
def test_to_str
expected = "foo-1.0.tag.bottle.tar.gz"
assert_equal expected, fn(0).to_s