summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_env.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index 77e83863c5a..29c058339fd 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