diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/shell/test_command_processor.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/shell/test_command_processor.rb b/test/shell/test_command_processor.rb index d0bcf8e349..7e1aa5bce7 100644 --- a/test/shell/test_command_processor.rb +++ b/test/shell/test_command_processor.rb @@ -68,6 +68,24 @@ class TestShell::CommandProcessor < Test::Unit::TestCase 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 + def test_option_type name = 'foo.cmd' path = File.join(@tmpdir, name) |