File: test_testlib.sh

package info (click to toggle)
pbuilder 0.231.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,864 kB
  • sloc: sh: 5,726; xml: 1,755; makefile: 248; ansic: 11
file content (33 lines) | stat: -rwxr-xr-x 507 bytes parent folder | download | duplicates (5)
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
#!/bin/bash
# testsuite for testlib

TD="$(dirname "$0")"
. "$TD/testlib.sh"
if [ -n "$PBUILDER_CHECKOUT" ]; then
    . "$PBUILDER_CHECKOUT/pbuilder-modules"
else
    . "$PBUILDER_TEST_PKGLIBDIR/pbuilder-modules"
fi

test_success() {
    exit 0
}

test_fail() {
    exit 1
}

test_options() {
    echo "$@"
    exit 1
}

test_output() {
    echo "$@"
}

expect_success test_success
expect_fail test_fail
expect_fail test_options "hello world"
expect_output "foo bar" test_output "foo" "bar"
testlib_summary