diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-05 15:39:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-05 15:39:46 +0000 |
commit | e70df3a701d01a54df5e9b665415c7f3a86779c1 (patch) | |
tree | fd6add9be2ebdecf9ead089f3e6298ec2b1e844a /test/ruby/test_env.rb | |
parent | 549605c15dd30252fbdf777f719bd9572a5e3b92 (diff) | |
download | ruby-e70df3a701d01a54df5e9b665415c7f3a86779c1.tar.gz |
hash.c: env_name_new
* hash.c (env_enc_str_new): make string for an environment
variable name or value.
* hash.c (env_name_new): make environment value string with the
encoding for its name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_env.rb')
-rw-r--r-- | test/ruby/test_env.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb index 77e83863c5..29c058339f 100644 --- a/test/ruby/test_env.rb +++ b/test/ruby/test_env.rb @@ -46,6 +46,7 @@ class TestEnv < Test::Unit::TestCase end ENV['TEST'] = 'bar' assert_equal('bar', ENV['TEST']) + assert_predicate(ENV['TEST'], :tainted?) if IGNORE_CASE assert_equal('bar', ENV['test']) else @@ -112,6 +113,7 @@ class TestEnv < Test::Unit::TestCase assert_invalid_env {|v| ENV[v]} ENV[PATH_ENV] = "" assert_equal("", ENV[PATH_ENV]) + assert_predicate(ENV[PATH_ENV], :tainted?) assert_nil(ENV[""]) end @@ -130,6 +132,7 @@ class TestEnv < Test::Unit::TestCase assert_nothing_raised { ENV.fetch(PATH_ENV, "foo") } ENV[PATH_ENV] = "" assert_equal("", ENV.fetch(PATH_ENV)) + assert_predicate(ENV.fetch(PATH_ENV), :tainted?) end def test_aset |