diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-24 00:25:41 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-04-24 00:25:41 +0200 |
commit | d9c52b10cd7f2ae9f59b8ed80bec625ac835bacd (patch) | |
tree | 961834a98e4e47b17ec9786cc6675cafdedc85b1 /t | |
parent | 20fc1d75ea897debdd93097de882a45dbf001796 (diff) | |
download | sbotools-d9c52b10cd7f2ae9f59b8ed80bec625ac835bacd.tar.xz |
t/19-unit.t: move repo away properly for check_repo() test
Diffstat (limited to 't')
-rwxr-xr-x | t/19-unit.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/19-unit.t b/t/19-unit.t index 8d092f3..7c0e0be 100755 --- a/t/19-unit.t +++ b/t/19-unit.t @@ -87,7 +87,9 @@ is(indent(1, "foo\n\nbar"), " foo\n\n bar", 'indent(1,...) returns correctly'); SKIP: { skip 'Test invalid if no SLACKBUILDS.TXT exists.', 3 if ! -e '/usr/sbo/repo/SLACKBUILDS.TXT'; - system("mv /usr/sbo/repo/* /usr/sbo"); + system(qw"cp /usr/sbo/repo/SLACKBUILDS.TXT /usr/sbo"); + system(qw"rm -rf", "$RealBin/repo.backup"); + system(qw"mv /usr/sbo/repo", "$RealBin/repo.backup"); is (SBO::Lib::check_repo(), 1, 'check_repo() returned 1 when /usr/sbo/repo was empty'); @@ -99,6 +101,10 @@ SKIP: { SBO::Lib::migrate_repo(); ok (-d '/usr/sbo/repo', '/usr/sbo/repo correctly recreated by migrate_repo()'); + + system(qw"rm /usr/sbo/repo/SLACKBUILDS.TXT"); + system(qw! rmdir /usr/sbo/repo !); + system("mv", "$RealBin/repo.backup", "/usr/sbo/repo"); } # 19-20: test check_repo(); |