test/test_cmdline_array.rb in getopt-declare-1.25 vs test/test_cmdline_array.rb in getopt-declare-1.26

- old
+ new

@@ -6,15 +6,15 @@ class TC_Array < Test::Unit::TestCase def setup @file = __FILE__ - @args = Getopt::Declare.new( %q{ + @args = Getopt::Declare.new( <<EOF, :build ) -v <value:i> [etc] One or more values <infile:if> Input file [required] -o <outfiles:of>... Output files - }, :build ) +EOF end def test_infile @args.parse(@file) assert_equal( @file, @args['<infile>'] ) @@ -50,13 +50,11 @@ end def test_usage usage = @args.usage # We don't check first lines, as they contain date - usage.sub!(/.*Options:/m, '') - puts usage + usage.sub!(/.*Options:\n/m, '') assert_equal( <<"EOF", usage ) - -v <value> [etc] One or more values <infile> Input file -o <outfiles>... Output files EOF end