diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-11 04:15:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-11 04:15:14 +0000 |
commit | 507477af54fe3d0a088cc63fa85a02dd72ea9812 (patch) | |
tree | ee77b1d29d5c368db2a0bb04562b67f6cfca67fa /test/test_rbconfig.rb | |
parent | f882c4c5e09fb5a6f78a8c04ce2dc2a69573db93 (diff) | |
download | ruby-507477af54fe3d0a088cc63fa85a02dd72ea9812.tar.gz |
Makefile.sub: sitearch
* win32/Makefile.sub (config.status): site and vendor directories
should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_rbconfig.rb')
-rw-r--r-- | test/test_rbconfig.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/test_rbconfig.rb b/test/test_rbconfig.rb new file mode 100644 index 0000000000..b241a926fc --- /dev/null +++ b/test/test_rbconfig.rb @@ -0,0 +1,41 @@ +require 'test/unit' +require 'rbconfig' + +class TestRbConfig < Test::Unit::TestCase + def test_sitedirs + RbConfig::MAKEFILE_CONFIG.each do |key, val| + next unless /\Asite(?!arch)/ =~ key + assert_match(/(?:\$\(|\/)site/, val, key) + end + end + + def test_vendordirs + RbConfig::MAKEFILE_CONFIG.each do |key, val| + next unless /\Avendor(?!arch)/ =~ key + assert_match(/(?:\$\(|\/)vendor/, val, key) + end + end + + def test_archdirs + RbConfig::MAKEFILE_CONFIG.each do |key, val| + next unless /\A(?!site|vendor|archdir\z).*arch.*dir\z/ =~ key + assert_match(/\$\(arch|\$\(rubyarchprefix\)/, val, key) + end + end + + def test_sitearchdirs + bug7823 = '[ruby-dev:46964] [Bug #7823]' + RbConfig::MAKEFILE_CONFIG.each do |key, val| + next unless /\Asite.*arch.*dir\z/ =~ key + assert_match(/\$\(sitearch|\$\(rubyarchprefix\)/, val, "#{key} #{bug7823}") + end + end + + def test_vendorarchdirs + bug7823 = '[ruby-dev:46964] [Bug #7823]' + RbConfig::MAKEFILE_CONFIG.each do |key, val| + next unless /\Avendor.*arch.*dir\z/ =~ key + assert_match(/\$\(sitearch|\$\(rubyarchprefix\)/, val, "#{key} #{bug7823}") + end + end +end |