diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-10-13 10:26:06 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-10-13 10:26:06 +0000 |
commit | 72075b8430b826d7dd489765c1004e4161479fa2 (patch) | |
tree | 682a8d69bcc478082f1805859eb72445e8b6cf42 /t/test_pbuilder-satisfydepends-checkparams | |
parent | 524cde2e544f40dc2056d2a4c4265ddc4160784d (diff) | |
download | pbuilder-72075b8430b826d7dd489765c1004e4161479fa2.tar pbuilder-72075b8430b826d7dd489765c1004e4161479fa2.tar.gz |
move all tests under a t/ directory
Diffstat (limited to 't/test_pbuilder-satisfydepends-checkparams')
-rwxr-xr-x | t/test_pbuilder-satisfydepends-checkparams | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/t/test_pbuilder-satisfydepends-checkparams b/t/test_pbuilder-satisfydepends-checkparams new file mode 100755 index 0000000..ccb044d --- /dev/null +++ b/t/test_pbuilder-satisfydepends-checkparams @@ -0,0 +1,51 @@ +#!/bin/bash + +TD="$(dirname "$0")" +if [ -n "$PBUILDER_CHECKOUT" ]; then + . "$TD/testlib.sh" + PBUILDER_SATISFYDEPENDS_CHECKPARAMS="$PBUILDER_CHECKOUT/pbuilder-satisfydepends-checkparams" +else + . "$TD/testlib.sh" + PBUILDER_SATISFYDEPENDS_CHECKPARAMS="$PBUILDER_TEST_PKGLIBDIR/pbuilder-satisfydepends-checkparams" +fi + +# 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 |