aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-12-01 22:34:58 +0100
committerAngelo Naselli <anaselli@linux.it>2014-12-01 22:34:58 +0100
commitcb2cf96a6a5e16af940a5b420fea6a760aff568c (patch)
treecf48a82c4c0a02e1b0ee35bb0460f498ffdb74cd /t
parenta148fd82b051556c65e1c0365a48b0bb9a13e91b (diff)
downloadmanatools-cb2cf96a6a5e16af940a5b420fea6a760aff568c.tar
manatools-cb2cf96a6a5e16af940a5b420fea6a760aff568c.tar.gz
manatools-cb2cf96a6a5e16af940a5b420fea6a760aff568c.tar.bz2
manatools-cb2cf96a6a5e16af940a5b420fea6a760aff568c.tar.xz
manatools-cb2cf96a6a5e16af940a5b420fea6a760aff568c.zip
Added rpmnew management
Diffstat (limited to 't')
-rw-r--r--t/05-rpmnew.t36
1 files changed, 36 insertions, 0 deletions
diff --git a/t/05-rpmnew.t b/t/05-rpmnew.t
new file mode 100644
index 00000000..cc1021f6
--- /dev/null
+++ b/t/05-rpmnew.t
@@ -0,0 +1,36 @@
+use 5.006;
+use strict;
+use warnings FATAL => 'all';
+use Test::More;
+
+BEGIN {
+ use_ok( 'AdminPanel::Rpmdragora::rpmnew' ) || print "AdminPanel::Rpmdragora::rpmnew failed!\n";
+}
+
+ diag "\n\nNext tests will create some gui dialogs";
+ diag "Perform tests (y/n) [n] ?";
+
+ my $a = <>; chomp $a; $a = "n" unless $a;
+
+ SKIP: {
+ #remember to skip the righ number of tests
+ skip "You didn't say yes...", 1, unless ( $a eq "y" );
+
+ open (MYFILE, '>/tmp/_rpmnew_test');
+ print MYFILE "value = 1\n";
+ print MYFILE "value1 = 2\n";
+ close (MYFILE);
+ open (MYFILE, '>/tmp/_rpmnew_test.rpmnew');
+ print MYFILE "value = 2\n";
+ print MYFILE "value1 = 1\n";
+ close (MYFILE);
+
+ is( AdminPanel::Rpmdragora::rpmnew::rpmnew_dialog("Test rpmnew dialog", (
+ test_package => ["/tmp/_rpmnew_test", "/tmp/rpmnew_test"],
+ test_package2 => ["/tmp/tp2"],
+ )), 0, 'rpmnew');
+
+ }
+
+
+done_testing;