Sha256: c1d8dad696a35c36885c460dad47feab11a36876bdaa571fc8c5041f527efdcb
Contents?: true
Size: 729 Bytes
Versions: 10
Compression:
Stored size: 729 Bytes
Contents
require 'runit/testcase' require 'runit/cui/testrunner' require 'runit/testsuite' require 'diff' require 'test_cases' class UnixDiffTest < RUNIT::TestCase include DiffArrayTests #include DiffStressTest def makefile(filename, ary) File.open(filename, "w") { |f| ary.each { |elem| f.puts elem.to_s } } end def rundiff(prog) res = [] IO.popen("#{prog} file1 file2") { |f| while ln = f.gets res << ln end } res end def difftest(a, b) makefile("file1", a) makefile("file2", b) result1 = rundiff("diff") result2 = rundiff("lib/unixdiff.rb"); assert_equal(result1, result2) end end RUNIT::CUI::TestRunner.run(UnixDiffTest.suite)
Version data entries
10 entries across 10 versions & 1 rubygems