aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-09-26 22:01:00 -0500
committerJack Nagel2014-09-26 22:01:00 -0500
commit701691c261778c8f3b531b2b827f046b97ac0bf0 (patch)
treeda518f268e1281a95c51232b140a8ffce9af4a6e /Library
parentc0cb58177e1a594a4e2e0316b66b39306a4da4b7 (diff)
downloadbrew-701691c261778c8f3b531b2b827f046b97ac0bf0.tar.bz2
Add missing test for inreplace with tabs
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_inreplace.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_inreplace.rb b/Library/Homebrew/test/test_inreplace.rb
index 69f9ca43a..0acdc9342 100644
--- a/Library/Homebrew/test/test_inreplace.rb
+++ b/Library/Homebrew/test/test_inreplace.rb
@@ -63,4 +63,17 @@ class InreplaceTest < Homebrew::TestCase
s.extend(StringInreplaceExtension)
assert_equal "-Wall -O2", s.get_make_var("CFLAGS")
end
+
+ def test_change_make_var_with_tabs
+ s = "CFLAGS\t=\t-Wall -O2\nLDFLAGS\t=\t-lcrypto -lssl"
+ s.extend(StringInreplaceExtension)
+
+ assert_equal "-Wall -O2", s.get_make_var("CFLAGS")
+
+ s.change_make_var! "CFLAGS", "-O3"
+ assert_equal "CFLAGS=-O3\nLDFLAGS\t=\t-lcrypto -lssl", s
+
+ s.remove_make_var! "LDFLAGS"
+ assert_equal "CFLAGS=-O3\n", s
+ end
end