aboutsummaryrefslogtreecommitdiff
path: root/test_pbuilder-satisfydepends-checkparams
blob: 1c4d65d9180550d3026e69f15f8c67dcf8331f8e (plain)
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
#!/bin/bash

. ./testlib.sh

# testsuite to test pbuilder-satisfydepends-checkparams.

# mock function
checkbuilddep_internal() {
    : # do nothing function    
}

test_chrootexec2() {
    set -- --internal-chrootexec 'chroot /tmp-hoge ' --chroot /tmp
    . ./pbuilder-satisfydepends-checkparams
}
expect_fail test_chrootexec2

test_chrootexec1() {
    set -- --chroot /tmp --internal-chrootexec 'chroot /tmp-hoge '
    . ./pbuilder-satisfydepends-checkparams
}
expect_success test_chrootexec1

test_chrootexec_echo() {
    set -- --echo --chroot /tmp
    . ./pbuilder-satisfydepends-checkparams
}
expect_fail test_chrootexec_echo

test_chrootexec_echo2() {
    set -- --chroot /tmp --echo 
    . ./pbuilder-satisfydepends-checkparams
    echo $CHROOTEXEC
}
expect_output "echo chroot /tmp" test_chrootexec_echo2 

test_chrootexec_expect() {
    set -- --chroot /tmp --internal-chrootexec 'chroot /tmp-hoge '
    . ./pbuilder-satisfydepends-checkparams
    echo $CHROOTEXEC
}
expect_output "chroot /tmp-hoge" test_chrootexec_expect 

testlib_summary