aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-14 02:37:53 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-14 02:37:53 +0100
commitf9e6c214e191e7100646af617e399b095449679d (patch)
treea2ec161c4be6a375649b4ffbcab7aaf32b609e0b
parentf7178c147fb776563c6aa71b87a102e749093f51 (diff)
downloadsbotools2-f9e6c214e191e7100646af617e399b095449679d.tar.xz
Move files back to pre-migration state after test finish
-rwxr-xr-xt/test.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/test.t b/t/test.t
index 6cc0b39..867057f 100755
--- a/t/test.t
+++ b/t/test.t
@@ -51,6 +51,9 @@ if (-f '/etc/slackware-version') {
$version = '14.1' unless $version;
is(get_slack_version(), $version, 'get_slack_version is good');
+# make sure we migrate when we should
+ok(-f "$sbo_home/SLACKBUILDS.TXT", 'SLACKBUILDS.TXT exists pre-migration');
+
# chk_slackbuilds_txt tests
is(chk_slackbuilds_txt(), 1, 'chk_slackbuilds_txt is good');
move("$repo_path/SLACKBUILDS.TXT", "$sbo_home/SLACKBUILDS.TXT.moved");
@@ -509,4 +512,11 @@ is($regex, '(?^u: xapian-bindings-[^-]+.tar.gz)', 'get_dc_regex test 04.1');
is($initial, ' ', 'get_dc_regex test 04.2');
# end of tests.
+
+# move things back to pre-migration state
+foreach my $fname (glob("$repo_path/*")) {
+ move $fname, $sbo_home;
+}
+unlink $repo_path;
+
done_testing();