Sha256: d7e144668fbf56dcde9a56361613b7c2b5752573dd0478949cc9a9f5864d8fdd
Contents?: true
Size: 1.2 KB
Versions: 3
Compression:
Stored size: 1.2 KB
Contents
# -*- encoding: utf-8 -*- # To test use # rake TEST=test/test_wild_search.rb require 'test/unit' require 'code_zauker' # See ri Test::Unit::Assertions # for assertion documentation class FileScannerBasicSearch < Test::Unit::TestCase #This test can search very uinque things... def test_foolish_wild1 fs=CodeZauker::FileScanner.new() fs.load("./test/fixture/wildtest.txt") files=fs.wsearch("Wild*West") assert(files.include?("./test/fixture/wildtest.txt")== true, "Expected file not found. Files found:#{files}") end def test_foolish_wild2 fs=CodeZauker::FileScanner.new() fs.load("./test/fixture/wildtest.txt") files=fs.wsearch("Wild*West*Movie") assert(files.include?("./test/fixture/wildtest.txt")== true, "Expected file not found. Files found:#{files}") end # Also unordered match will work # So the negative match is difficult def test_foolish_wild3 fs=CodeZauker::FileScanner.new() fs.load("./test/fixture/wildtest.txt") files=fs.wsearch("West*Wild*NotOnTheSameLineForSure") assert(files.include?("./test/fixture/wildtest.txt")== false, "Expected not matching wildtest.txt file. Matches:#{files}") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
code_zauker-0.1.0 | test/test_wild_search.rb |
code_zauker-0.0.9 | test/test_wild_search.rb |
code_zauker-0.0.8 | test/test_wild_search.rb |