summaryrefslogtreecommitdiff
path: root/test/shell/test_command_processor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/shell/test_command_processor.rb')
-rw-r--r--test/shell/test_command_processor.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/shell/test_command_processor.rb b/test/shell/test_command_processor.rb
index 99fe1b222a..6626befb79 100644
--- a/test/shell/test_command_processor.rb
+++ b/test/shell/test_command_processor.rb
@@ -66,4 +66,22 @@ class TestShell::CommandProcessor < Test::Unit::TestCase
Process.waitall
Dir.rmdir(path)
end
+
+ def test_test
+ name = "foo#{exeext}"
+ path = File.join(@tmpdir, name)
+ open(path, "w", 0644) {}
+
+ assert_equal(true, @shell[?e, path])
+ assert_equal(true, @shell[:e, path])
+ assert_equal(true, @shell["e", path])
+ assert_equal(true, @shell[:exist?, path])
+ assert_equal(true, @shell["exist?", path])
+ assert_raise_with_message(RuntimeError, /unsupported command/) do
+ assert_equal(true, @shell[:instance_eval, path])
+ end
+ ensure
+ Process.waitall
+ File.unlink(path)
+ end
end