# File lib/fastcst/changeset.rb, line 648 648: def test(indata, dir) 649: begin 650: Dir.chdir do 651: return true if @symlink 652: return false unless File.exist? @path 653: 654: # do a test run of the delta on the file contents 655: if @length > 0 656: delta = StringIO.new(indata.read(@length)) 657: reference = File.read @path 658: outfile = StringIO.new 659: 660: SuffixArrayDelta::apply_delta(reference, delta, outfile) 661: end 662: end 663: rescue 664: UI.failure :delta, "#$!" 665: # no need to skip here since we actually read during this test 666: return false 667: end 668: 669: return true 670: end