HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/src/ruby-2.5.9/spec/ruby/command_line/dash_c_spec.rb
require File.expand_path('../../spec_helper', __FILE__)

describe "The -c command line option" do
  it "checks syntax in given file" do
    ruby_exe(nil, args: "-c #{__FILE__}").chomp.should == "Syntax OK"
  end

  it "checks syntax in -e strings" do
    ruby_exe(nil, args: "-c -e 'puts 1' -e 'hello world'").chomp.should == "Syntax OK"
  end

  #Also needs spec for reading from STDIN
end