summaryrefslogtreecommitdiffstats
path: root/t/superuser--arch_to_noarch.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-30 13:28:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-30 13:28:03 +0000
commit37b66b6b34d29c9e628c4a0bbf5babdb5e1340fe (patch)
tree9847ca49d51ce41e951fcabcd0ed6344a3e5009a /t/superuser--arch_to_noarch.t
parente15d45cca3d34d223927cf37f497de3a9703fb78 (diff)
downloadurpmi-37b66b6b34d29c9e628c4a0bbf5babdb5e1340fe.tar
urpmi-37b66b6b34d29c9e628c4a0bbf5babdb5e1340fe.tar.gz
urpmi-37b66b6b34d29c9e628c4a0bbf5babdb5e1340fe.tar.bz2
urpmi-37b66b6b34d29c9e628c4a0bbf5babdb5e1340fe.tar.xz
urpmi-37b66b6b34d29c9e628c4a0bbf5babdb5e1340fe.zip
using --urpmi-root, create some tests using urpmi.addmedia, urpmi, urpme
one drawback of the superuser--*.t is the need to be root (the rpmlib needs it to install in a root partition), so for now "make test" tests *.t but superuser--*.t are skipped. Then as root, run "sudo make test TEST_FILES='t/superuser--*.t'"
Diffstat (limited to 't/superuser--arch_to_noarch.t')
-rw-r--r--t/superuser--arch_to_noarch.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/superuser--arch_to_noarch.t b/t/superuser--arch_to_noarch.t
new file mode 100644
index 00000000..3224ea87
--- /dev/null
+++ b/t/superuser--arch_to_noarch.t
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+
+use strict;
+use Test::More 'no_plan';
+
+chdir 't' if -d 't';
+require './helper.pm';
+
+helper::need_root_and_prepare();
+
+my $name = 'arch_to_noarch';
+
+foreach my $nb (1 .. 4) {
+ my $medium_name = "${name}_$nb";
+ helper::urpmi_addmedia("$medium_name $::pwd/media/$medium_name");
+ helper::urpmi("$name");
+ is(`rpm -qa --root $::pwd/root`, "$name-$nb-1\n");
+}