ruby--ruby/spec/ruby/command_line/dash_upper_f_spec.rb

14 lines
367 B
Ruby

require_relative '../spec_helper'
describe "the -F command line option" do
before :each do
@passwd = fixture __FILE__, "passwd_file.txt"
end
it "specifies the field separator pattern for -a" do
ruby_exe("puts $F[0]", options: "-naF:", escape: true,
args: " < #{@passwd}").should ==
"nobody\nroot\ndaemon\n"
end
end