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-classic | |
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-classic')
-rwxr-xr-x | t/test_pbuilder-satisfydepends-classic | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/t/test_pbuilder-satisfydepends-classic b/t/test_pbuilder-satisfydepends-classic new file mode 100755 index 0000000..929699b --- /dev/null +++ b/t/test_pbuilder-satisfydepends-classic @@ -0,0 +1,116 @@ +#!/bin/bash +#for flavour in aptitude classic experimental gdebi; do +# (. ./pbuilder-satisfydepends-"$flavour") +#done + +TD="$(dirname "$0")" +if [ -n "$PBUILDER_CHECKOUT" ]; then + . "$TD/testlib.sh" + PBUILDER_SATISFYDEPENDS_CLASSIC="$PBUILDER_CHECKOUT/pbuilder-satisfydepends-classic" +else + . "$TD/testlib.sh" + PBUILDER_SATISFYDEPENDS_CLASSIC="$PBUILDER_TEST_PKGLIBDIR/pbuilder-satisfydepends-classic" +fi + +DEBIAN_CONTROL="" + +cleanup() { + if [ -n "$DEBIAN_CONTROL" ]; then + rm -f "$DEBIAN_CONTROL" + fi + testlib_cleanup_env +} + +trap cleanup sigpipe sighup exit + +# setup a fake installed environment +testlib_setup_env + +if [ -n "$PBUILDER_CHECKOUT" ]; then + PBUILDER_SATISFYDEPENDS_CLASSIC="$PBUILDER_CHECKOUT/pbuilder-satisfydepends-classic" +else + export PBUILDER_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" + PBUILDER_SATISFYDEPENDS_CLASSIC="$PBUILDER_PKGLIBDIR/pbuilder-satisfydepends-classic" +fi + +set -- --echo --control "$DEBIAN_CONTROL" +# this is just to source the functions +. "$PBUILDER_SATISFYDEPENDS_CLASSIC" >/dev/null 2>&1 || true + +DEBIAN_CONTROL="`mktemp -t`" +cat >"$DEBIAN_CONTROL" <<EOF +Build-Depends: debhelper (>= 5.0.0), gnome-pkg-tools, autotools-dev, cdbs, libglib2.0-dev (>= 2.12), libgtk2.0-dev (>= 2.10), libgnome2-dev (>= 2.16.0), libgnomeui-dev (>= 2.16.0), libglade2-dev, libgnomevfs2-dev (>= 2.9.2), libgconf2-dev, libxft-dev, libperl-dev, python-dev, tcl8.4-dev, libxml-parser-perl, libdbus-glib-1-dev (>= 0.60), libtool, scrollkeeper, libgnutls-dev, libnotify-dev (>= 0.3.2-0), libsexy-dev (>= 0.1.7), gnome-doc-utils, libssl-dev (>= 0.9.8b-1), liblaunchpad-integration-dev + +EOF + +test_split_deps() { + get_build_deps | split_deps +} + +expect_output "debhelper/(>=/5.0.0) +gnome-pkg-tools +autotools-dev +cdbs +libglib2.0-dev/(>=/2.12) +libgtk2.0-dev/(>=/2.10) +libgnome2-dev/(>=/2.16.0) +libgnomeui-dev/(>=/2.16.0) +libglade2-dev +libgnomevfs2-dev/(>=/2.9.2) +libgconf2-dev +libxft-dev +libperl-dev +python-dev +tcl8.4-dev +libxml-parser-perl +libdbus-glib-1-dev/(>=/0.60) +libtool +scrollkeeper +libgnutls-dev +libnotify-dev/(>=/0.3.2-0) +libsexy-dev/(>=/0.1.7) +gnome-doc-utils +libssl-dev/(>=/0.9.8b-1) +liblaunchpad-integration-dev" test_split_deps + +expect_output "foo +bar" split_alternates "foo | bar" + +expect_output "debhelper +gnome-pkg-tools +autotools-dev +cdbs +libglib2.0-dev +libgtk2.0-dev +libgnome2-dev +libgnomeui-dev +libglade2-dev +libgnomevfs2-dev +libgconf2-dev +libxft-dev +libperl-dev +python-dev +tcl8.4-dev +libxml-parser-perl +libdbus-glib-1-dev +libtool +scrollkeeper +libgnutls-dev +libnotify-dev +libsexy-dev +gnome-doc-utils +libssl-dev +liblaunchpad-integration-dev" get_pkg_name "`test_split_deps`" + +expect_output ">= 5.0.0 +>= 2.12 +>= 2.10 +>= 2.16.0 +>= 2.16.0 +>= 2.9.2 +>= 0.60 +>= 0.3.2-0 +>= 0.1.7 +>= 0.9.8b-1" get_dep_op_and_ver "`test_split_deps`" + +testlib_summary |