Sha256: 41343f47ef7d14f1761e59666392a1305f5e475c7fdfdae02ce17c41754fc6b7

Contents?: true

Size: 561 Bytes

Versions: 7

Compression:

Stored size: 561 Bytes

Contents

#!/usr/bin/env ruby
require 'test/unit'
require_relative '../../app/cmd_parser'

class TestAppCmdParser < Test::Unit::TestCase
  def setup
    @cp = CmdParse.new('', :debug=>true)
  end

  def test_parse_filename
    [
     ['filename', 'filename'],
     ['"this is a filename"', 'this is a filename'],
     ['this\ is\ another\ filename', 'this is another filename'],
     ['C\:filename', 'C:filename']
    ].each do |name, expect|
      @cp.setup_parser(name, :debug => true)
      res = @cp._filename
      assert_equal(expect, @cp.result)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
trepanning-2.15.35 test/unit/test-app-cmd_parser.rb
trepanning-1.93.35 test/unit/test-app-cmd_parser.rb
trepanning-2.15.33 test/unit/test-app-cmd_parser.rb
trepanning-1.93.32 test/unit/test-app-cmd_parser.rb
trepanning-0.1.6 test/unit/test-app-cmd_parser.rb
trepanning-0.1.4 test/unit/test-app-cmd_parser.rb
trepanning-0.1.3 test/unit/test-app-cmd_parser.rb