1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
. $(dirname $0)/helper.sh
test_Testsuite_autopkgtest_pkg_ruby() {
has debian/control 'Testsuite: autopkgtest-pkg-ruby'
check_run autodep8
}
test_XS_Testsuite_autopkgtest_pkg_ruby() {
has debian/control 'XS-Testsuite: autopkgtest-pkg-ruby'
check_run autodep8
}
test_ruby_rake() {
has debian/ruby-tests.rake
check_run autodep8
}
test_ruby_testrb() {
has debian/ruby-tests.rb
check_run autodep8
}
test_ruby_test_files() {
has debian/ruby-test-files.yaml
check_run autodep8
}
test_ruby_no_debhelper() {
has debian/ruby-tests.rake
has debian/control "Build-Depends: debhelper, gem2deb, rake"
check_run autodep8
assertFalse "test does must not depend on debhelper\n$(grep Depends: stdout)\n" "grep -q Depends:.*debhelper stdout"
}
test_ruby_no_gem2deb() {
has debian/ruby-tests.rake
has debian/control "Build-Depends: debhelper, gem2deb, rake"
check_run autodep8
assertFalse "test does must not depend on gemdeb\n$(grep Depends: stdout)\n" "grep -q 'Depends:.*gem2deb(\s\|,)' stdout"
}
test_ruby_gem2deb_test_runner() {
has debian/ruby-tests.rb
check_run autodep8
assertTrue "test depends on gem2deb-test-runner\n$(grep Depends: stdout)\n" 'grep Depends:.*gem2deb-test-runner stdout'
}
debian_control_with_comments='
Build-Depends: debhelper,
gem2deb,
# foo,
bar,
'
test_ruby_removes_comments() {
has debian/ruby-tests.rb
echo "$debian_control_with_comments" > debian/control
check_run autodep8
assertFalse "should remove comments from Build-Depends" "grep '^Depends:.*#' stdout"
}
test_ruby_build_profiles() {
has debian/ruby-tests.rb
echo "Build-Depends: foo <!nocheck>, bar" > debian/control
check_run autodep8
assertFalse "should remove build profiles" "grep nocheck stdout"
}
. shunit2
|