diff options
| author | Jack Nagel | 2014-09-26 22:01:00 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-09-26 22:01:00 -0500 |
| commit | 99ae0eecb15d25555a2bb27d029dfe29eb968faf (patch) | |
| tree | 030263838043e3b8a770d2ab7d1a4415c564c355 /Library/Homebrew/test/test_inreplace.rb | |
| parent | 3dd97ea31b9755a257a6406525e968f2fd4c94b8 (diff) | |
| download | homebrew-99ae0eecb15d25555a2bb27d029dfe29eb968faf.tar.bz2 | |
Add missing test for inreplace with tabs
Diffstat (limited to 'Library/Homebrew/test/test_inreplace.rb')
| -rw-r--r-- | Library/Homebrew/test/test_inreplace.rb | 13 |
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 |
