File: php_test.sh

package info (click to toggle)
autodep8 0.30
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 276 kB
  • sloc: sh: 1,139; makefile: 31
file content (31 lines) | stat: -rw-r--r-- 1,195 bytes parent folder | download | duplicates (2)
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
. $(dirname $0)/helper.sh

test_php() {
  has 'debian/control' 'Source: php-foo\n\nPackage:php-foo\nTestsuite: autopkgtest-pkg-php'
  check_run autodep8
  assertTrue 'runs phpunit-autopkgtest' 'grep "Test-Command: phpunit-autopkgtest" stdout'
  assertTrue 'sets test name' 'grep "Features:.*test-name=" stdout'
}

test_extra_depends() {
  has 'debian/control' 'Source: php-foo\n\nPackage:php-foo\nTestsuite: autopkgtest-pkg-php'
  has 'debian/tests/autopkgtest-pkg-php.conf' 'extra_depends=foobar'
  check_run autodep8
  assertTrue 'uses extra depends' 'grep "Depends:.*, foobar" stdout'
}

test_extra_restrictions() {
  has 'debian/control' 'Source: php-foo\n\nPackage:php-foo\nTestsuite: autopkgtest-pkg-php'
  has 'debian/tests/autopkgtest-pkg-php.conf' 'extra_restrictions=isolation-container'
  check_run autodep8
  assertTrue 'uses extra depends' 'grep "Restrictions:.*, isolation-container" stdout'
}

test_architecture() {
  has 'debian/control' 'Source: php-foo\n\nPackage:php-foo\nTestsuite: autopkgtest-pkg-php'
  has 'debian/tests/autopkgtest-pkg-php.conf' 'architecture=amd64'
  check_run autodep8
  assertTrue 'uses architecture' 'grep "^Architecture: amd64$" stdout'
}

. shunit2