aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_string.rb
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-12-19 11:54:53 +0100
committerBaptiste Fontaine2015-12-20 12:11:40 +0100
commita6d2723ef532dc576968f6f9e155c165e47f26b2 (patch)
tree46cff38bb79e50f6533ceceb83e19e5f9b865385 /Library/Homebrew/test/test_string.rb
parentf25894981663ba20596483d8391be232226a4954 (diff)
downloadbrew-a6d2723ef532dc576968f6f9e155c165e47f26b2.tar.bz2
more core unit tests
Closes Homebrew/homebrew#47182. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library/Homebrew/test/test_string.rb')
-rw-r--r--Library/Homebrew/test/test_string.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_string.rb b/Library/Homebrew/test/test_string.rb
index 44582c510..d3f2bc268 100644
--- a/Library/Homebrew/test/test_string.rb
+++ b/Library/Homebrew/test/test_string.rb
@@ -31,4 +31,10 @@ I'm not indented
assert_equal "hello\ngoodbye\n\n", undented
end
+
+ def test_inreplace_sub_failure
+ s = "foobar".extend StringInreplaceExtension
+ s.sub! "not here", "test"
+ assert_equal [%(expected replacement of "not here" with "test")], s.errors
+ end
end