summaryrefslogtreecommitdiffstats
path: root/t/superuser--rpm.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-27 12:14:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-27 12:14:19 +0000
commitbca32182ad43ddbcab36eefb467822f14fd77cef (patch)
treec987a7bee49ac7595cf2b8c1d5f56e3672f76b1e /t/superuser--rpm.t
parent5d9dc5e7611430e4b3fe7f16c0060cd47c31fa2e (diff)
downloadurpmi-bca32182ad43ddbcab36eefb467822f14fd77cef.tar
urpmi-bca32182ad43ddbcab36eefb467822f14fd77cef.tar.gz
urpmi-bca32182ad43ddbcab36eefb467822f14fd77cef.tar.bz2
urpmi-bca32182ad43ddbcab36eefb467822f14fd77cef.tar.xz
urpmi-bca32182ad43ddbcab36eefb467822f14fd77cef.zip
- move some test from superuser--media_info_dir.t into superuser--rpm.t
- add a test
Diffstat (limited to 't/superuser--rpm.t')
-rw-r--r--t/superuser--rpm.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/superuser--rpm.t b/t/superuser--rpm.t
new file mode 100644
index 00000000..4930d30d
--- /dev/null
+++ b/t/superuser--rpm.t
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+use strict;
+use lib '.', 't';
+use helper;
+use Test::More 'no_plan';
+
+my $name = 'rpm-query-in-scriptlet';
+
+need_root_and_prepare();
+test_rpm_query_in_scriptlet();
+
+sub test_rpm_query_in_scriptlet {
+ system_("rpm --root $::pwd/root -i media/$name/$name*.rpm --nodeps");
+ check_installed_names($name);
+ rebuilddb();
+ check_installed_names($name);
+}
+
+sub rebuilddb {
+ # testing rebuilddb (could be done elsewhere, but here is
+ system_("rpm --root $::pwd/root --rebuilddb");
+ my ($dir) = glob("$::pwd/root/var/lib/rpmrebuilddb*");
+ is($dir, undef, "$dir should not be there");
+}