aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-14 13:08:21 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-14 14:36:34 +0100
commit2a0cff55db8bf788e0047b0dae6e2e671484b7dc (patch)
tree72ec1b051a05c2be56eb913317bf9021a07fc4d9
parent099495c55d90a67b13c856040aab31d6ea2664a9 (diff)
downloadsbotools2-2a0cff55db8bf788e0047b0dae6e2e671484b7dc.tar.xz
Test sbosrcarch; see #19
-rw-r--r--t/sbo/SLACKBUILDS.TXT3
-rwxr-xr-xt/test.t15
2 files changed, 13 insertions, 5 deletions
diff --git a/t/sbo/SLACKBUILDS.TXT b/t/sbo/SLACKBUILDS.TXT
index 03db562..8f2c503 100644
--- a/t/sbo/SLACKBUILDS.TXT
+++ b/t/sbo/SLACKBUILDS.TXT
@@ -1668,9 +1668,6 @@ SLACKBUILD MD5SUM: 8ebcf0583f3077346ebace93c8ea166f
SLACKBUILD MD5SUM_x86_64:
SLACKBUILD SHORT DESCRIPTION: eawpats (MIDI instrument patches)
-SLACKBUILD NAME: test
-SLACKBUILD LOCATION: ./audio/test
-
SLACKBUILD NAME: ecasound
SLACKBUILD LOCATION: ./audio/ecasound
SLACKBUILD FILES: README ecasound.SlackBuild ecasound.info python_module_dir.diff slack-desc
diff --git a/t/test.t b/t/test.t
index 95d7a48..86943d2 100755
--- a/t/test.t
+++ b/t/test.t
@@ -511,12 +511,23 @@ $line = '( tar xvf xapian-bindings-$VERSION.tar.gz';
is($regex, '(?^u: xapian-bindings-[^-]+.tar.gz)', 'get_dc_regex test 04.1');
is($initial, ' ', 'get_dc_regex test 04.2');
+# test sbosrcarch
+$symlinks = check_distfiles(LOCATION => "$repo_path/audio/test");
+my $sym = $symlinks->[0];
+my $fn = "eawpats12_full.tar.gz";
+is ($sym, "$repo_path/audio/test/$fn", 'symlink is in the right place');
+ok (-l $sym, 'symlink is actually a symlink');
+is (readlink($sym), "$sbo_home/distfiles/$fn", 'symlink leads to the right place');
+ok (unlink(readlink($sym), $sym), "deleting $fn works");
+
+
+
# move things back to pre-migration state
foreach my $fname (glob("$repo_path/*")) {
is(system('mv', $fname, $sbo_home), 0, "moving $fname to pre-migration place works");
}
-is(system('rmdir', $repo_path), 0, "removing $repo_path works");
-is(system('rmdir', "$sbo_home/../test_sbo/repo", "$sbo_home/../test_sbo"), 0, "removing test_sbo works");
+ok (rmdir($repo_path), "removing $repo_path works");
+ok (do { rmdir("$sbo_home/../test_sbo/repo") and rmdir("$sbo_home/../test_sbo") }, "removing test_sbo works");
# end of tests.