t/teststatus: port to test/unit
Also, read the status for a single package to reduce the test run time
Antonio Terceiro
5 years ago
0 | require 'runit/testcase' | |
1 | require 'runit/cui/testrunner' | |
0 | require 'test/unit' | |
1 | require 'debian' | |
2 | 2 | |
3 | $:.unshift("../lib") | |
4 | require '../lib/debian.rb' | |
5 | ||
6 | class TestDebian__Status < RUNIT::TestCase | |
3 | class TestDebian__Status < Test::Unit::TestCase | |
7 | 4 | |
8 | 5 | def test_s_new |
9 | s = Debian::Status.new | |
6 | s = Debian::Status.new(['dpkg']) | |
10 | 7 | assert((s['dpkg'].data.find {|f| f == "/usr/bin/dpkg" }) != nil) |
11 | 8 | end |
12 | 9 | # |
23 | 20 | # end |
24 | 21 | |
25 | 22 | end |
26 | ||
27 | if $0 == __FILE__ | |
28 | if ARGV.size == 0 | |
29 | suite = TestDebian__Status.suite | |
30 | else | |
31 | suite = RUNIT::TestSuite.new | |
32 | ARGV.each do |testmethod| | |
33 | suite.add_test(TestDebian__Status.new(testmethod)) | |
34 | end | |
35 | end | |
36 | RUNIT::CUI::TestRunner.run(suite) | |
37 | end |