diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-14 02:37:53 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-14 02:37:53 +0100 |
commit | f9e6c214e191e7100646af617e399b095449679d (patch) | |
tree | a2ec161c4be6a375649b4ffbcab7aaf32b609e0b | |
parent | f7178c147fb776563c6aa71b87a102e749093f51 (diff) | |
download | sbotools2-f9e6c214e191e7100646af617e399b095449679d.tar.xz |
Move files back to pre-migration state after test finish
-rwxr-xr-x | t/test.t | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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(); |