Sha256: 2a4d23b92904cd46125bd34968f513b9400c4e95e668d72b271a1a4ac0d4bfad

Contents?: true

Size: 680 Bytes

Versions: 48

Compression:

Stored size: 680 Bytes

Contents

# -*- coding: utf-8 -*-
#
# @file 
# @brief
# @author ongaeshi
# @date   2012/03/02

require 'milkode/common/ignore_checker.rb'
require 'test_helper'

class TestIgnoreChecker < Test::Unit::TestCase
  include Milkode
  
  def test_basic
    c = IgnoreChecker.new
    c.add IgnoreSetting.new("/", ["/rdoc", "/test/data", "*.lock"])
    c.add IgnoreSetting.new("/pkg", ["*.gem"])

    assert_equal false, c.ignore?("/lib/test.rb")
    assert_equal true,  c.ignore?("/pkg/hoge.gem")
    assert_equal false,  c.ignore?("/pkg/hoge.txt")
    assert_equal true,  c.ignore?("/test.lock")
    assert_equal true,  c.ignore?("/rdoc")
    assert_equal true,  c.ignore?("/test/data")
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
milkode-1.8.9.2 test/test_ignore_checker.rb
milkode-1.8.9.1 test/test_ignore_checker.rb
milkode-1.8.9 test/test_ignore_checker.rb
milkode-1.8.8 test/test_ignore_checker.rb
milkode-1.8.7 test/test_ignore_checker.rb
milkode-1.8.6 test/test_ignore_checker.rb
milkode-1.8.5 test/test_ignore_checker.rb
milkode-1.8.4 test/test_ignore_checker.rb
milkode-1.8.3 test/test_ignore_checker.rb
milkode-1.8.2 test/test_ignore_checker.rb
milkode-1.8.1 test/test_ignore_checker.rb
milkode-1.8.0 test/test_ignore_checker.rb
milkode-1.7.1 test/test_ignore_checker.rb
milkode-1.7.0 test/test_ignore_checker.rb
milkode-1.6.1 test/test_ignore_checker.rb
milkode-1.6.0 test/test_ignore_checker.rb
milkode-1.5.0 test/test_ignore_checker.rb
milkode-1.4.0 test/test_ignore_checker.rb
milkode-1.3.0 test/test_ignore_checker.rb
milkode-1.2.0 test/test_ignore_checker.rb