aboutsummaryrefslogtreecommitdiff
path: root/t/test.t
diff options
context:
space:
mode:
authorJ Pipkin <j@dawnrazor.net>2013-01-12 07:14:20 -0600
committerJ Pipkin <j@dawnrazor.net>2013-01-12 07:14:20 -0600
commit32abf3c7e9183cfe79019c748e588496722f7426 (patch)
tree7d9cd861e15595abebdda688fb6066e82febba62 /t/test.t
parentb2a26f795d32e398bfc3dbfc13882419bd3ba929 (diff)
parentf177c4e5c4311e696373c77e593df452c7602d13 (diff)
downloadsbotools2-32abf3c7e9183cfe79019c748e588496722f7426.tar.xz
Merge branch 'exit_ask', fixes #41, fixes #37
Diffstat (limited to 't/test.t')
-rwxr-xr-xt/test.t28
1 files changed, 4 insertions, 24 deletions
diff --git a/t/test.t b/t/test.t
index b8bb7fc..3b0b799 100755
--- a/t/test.t
+++ b/t/test.t
@@ -14,6 +14,7 @@ chomp(my $pwd = `pwd`);
my $sbo_home = "$pwd/sbo";
$conf_file = "$pwd/sbotools.conf";
+$SBO::Lib::conf_file = $conf_file;
read_config;
$config{SBO_HOME} = $sbo_home;
$SBO::Lib::distfiles = "$sbo_home/distfiles";
@@ -47,9 +48,6 @@ is(chk_slackbuilds_txt, undef,
'chk_slackbuilds_txt returns false with no SLACKBUILDS.TXT');
move("$sbo_home/SLACKBUILDS.TXT.moved", "$sbo_home/SLACKBUILDS.TXT");
-#ok (rsync_sbo_tree == 1, 'rsync_sbo_tree is good');
-#ok (update_tree == 1, 'update_tree is good');
-
# slackbuilds_or_fetch test
is(slackbuilds_or_fetch, 1, 'slackbuilds_or_fetch is good');
@@ -246,9 +244,9 @@ ok(! get_sbo_from_loc('omg_wtf_bbq'),
# get_distfile tests
my $distfile = "$sbo_home/distfiles/Sort-Versions-1.5.tar.gz";
unlink $distfile if -f $distfile;
-is(get_distfile
- ('http://search.cpan.org/CPAN/authors/id/E/ED/EDAVIS/Sort-Versions-1.5.tar.gz',
- '5434f948fdea6406851c77bebbd0ed19'), 1, 'get_distfile is good');
+is(get_distfile(
+ 'http://search.cpan.org/CPAN/authors/id/E/ED/EDAVIS/Sort-Versions-1.5.tar.gz',
+ '5434f948fdea6406851c77bebbd0ed19'), 1, 'get_distfile test 01');
unlink $distfile;
# rewrite_slackbuild/revert_slackbuild tests
@@ -312,13 +310,6 @@ for my $item (@$listing) {
# remove_stuff test - can only really test for invalid input
is(remove_stuff('/omg/wtf/bbq'), 1, 'remove_stuff good for invalid input');
-# config_write test
-chmod 0444, $conf_file;
-is(config_write ('OMG', 'WTF'), undef,
- 'config_write returned undef correctly');
-chmod
-chmod 0644, $conf_file;
-
# perform_search tests
my $findings = perform_search('desktop');
for my $found (@$findings) {
@@ -385,17 +376,6 @@ $readme = do {local $/; <$fh>};
close $fh;
ok(! (get_opts $readme), 'get_opts good where README does not define opts');
-# clean_reqs tests
-
-# $SBO::Lib::compat32 = 0;
-# $reqs = get_requires "zdoom", "$sbo_home/games/zdoom";
-# $reqs = clean_reqs $reqs;
-# ok (! $$reqs[0], 'clean_reqs good for already installed reqs');
-# $reqs = get_requires 'gmpc', "$sbo_home/audio/gmpc";
-# $reqs = clean_reqs $reqs;
-# is ($$reqs[0], 'gob2', 'clean_reqs good for un/installed reqs.');
-# is ($$reqs[1], 'libmpd', 'clean_reqs good for un/installed reqs.');
-
# queue tests
# test multiple sbo's