From 49a97c280a35fe07bce036467da85ace0c006fa7 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 18 Jul 2014 15:14:42 -0500 Subject: Ask the filename object for the prefix --- Library/Homebrew/test/test_bottle_filename.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Library/Homebrew/test') 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 -- cgit v1.2.3