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
|
. $(dirname $0)/helper.sh
test_detect_nodejs() {
has 'debian/control' 'Source: node-foo'
check_run autodep8
}
test_nodejs_upstream_name_from_package_json() {
has 'debian/control' 'Source: node-foo'
has 'package.json' '{"name": "bar"}'
check_run autodep8
assertTrue 'pkg-js-autopkgtest' 'grep --quiet pkg-js-autopkgtest stdout'
assertFalse 'does not include node- prefix' 'grep --quiet node-foo stdout'
}
test_nodejs_upstream_name_from_source_package() {
has 'debian/control' 'Source: node-foo'
check_run autodep8
assertTrue 'pkg-js-autopkgtest' 'grep --quiet pkg-js-autopkgtest stdout'
assertFalse 'does not include node- prefix' 'grep --quiet node-foo stdout'
}
test_nodejs_upstream_name_from_binary_package() {
has 'debian/control' "Source: foo\n\nPackage: node-foo"
check_run autodep8
assertTrue 'pkg-js-autopkgtest' 'grep --quiet pkg-js-autopkgtest stdout'
assertFalse 'does not include node- prefix' 'grep --quiet node-foo stdout'
}
test_Testsuite_autopkgtest_pkg_nodejs() {
has debian/control "Testsuite: autopkgtest-pkg-nodejs"
has 'package.json' '{"name": "foo"}'
check_run autodep8
assertTrue 'pkg-js-autopkgtest' 'grep --quiet pkg-js-autopkgtest stdout'
assertFalse 'does not include node- prefix' 'grep --quiet node-foo stdout'
}
test_XS_Testsuite_autopkgtest_pkg_nodejs() {
has debian/control 'XS-Testsuite: autopkgtest-pkg-nodejs'
has 'package.json' '{"name": "foo"}'
check_run autodep8
assertTrue 'pkg-js-autopkgtest' 'grep --quiet pkg-js-autopkgtest stdout'
assertFalse 'does not include node- prefix' 'grep --quiet node-foo stdout'
}
. shunit2
|