diff options
Diffstat (limited to 'Library/Homebrew/test/test_inreplace.rb')
| -rw-r--r-- | Library/Homebrew/test/test_inreplace.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_inreplace.rb b/Library/Homebrew/test/test_inreplace.rb index 0acdc9342..5b226eb8d 100644 --- a/Library/Homebrew/test/test_inreplace.rb +++ b/Library/Homebrew/test/test_inreplace.rb @@ -76,4 +76,15 @@ class InreplaceTest < Homebrew::TestCase s.remove_make_var! "LDFLAGS" assert_equal "CFLAGS=-O3\n", s end + + def test_sub_gsub + s = "foo" + s.extend(StringInreplaceExtension) + + s.sub!("f", "b") + assert_equal "boo", s + + s.gsub!("o", "e") + assert_equal "bee", s + end end |
