diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-12 10:48:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-12 10:48:57 +0000 |
commit | 9e52416cd304c648e7bf49f1e77c81cd5adac506 (patch) | |
tree | 193bed0099ad0599045619bd863c9f85ddbfb975 /test | |
parent | e82f4195d49b730a48031738694391dbb3e41091 (diff) | |
download | ruby-9e52416cd304c648e7bf49f1e77c81cd5adac506.tar.gz |
erb: set variables from the command line
* bin/erb (ARGV.switch, ERB::Main#run): allow variables to be set
from the command line. [ruby-core:65772] [Feature #10395]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/erb/test_erb_command.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/erb/test_erb_command.rb b/test/erb/test_erb_command.rb new file mode 100644 index 0000000000..a21feb004d --- /dev/null +++ b/test/erb/test_erb_command.rb @@ -0,0 +1,10 @@ +# -*- coding: us-ascii -*- +require 'test/unit' + +class TestErbCommand < Test::Unit::TestCase + def test_var + assert_in_out_err([File.expand_path("../../../bin/erb", __FILE__), + "var=hoge"], + "<%=var%>", ["hoge"]) + end +end |