summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-01 14:18:28 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-01 14:18:28 -0700
commitf48595c3d891765cf4d20cf5a9a829c3ab295cb5 (patch)
treeddb59bd8a320a284f85298d4f3e7924cb97dd45c /t
parent7c6d991939009024e233d345d3e165017ff17e41 (diff)
downloadp5-Git-Annex-f48595c3d891765cf4d20cf5a9a829c3ab295cb5.tar.gz
add _store_unused_cache too
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 't')
-rwxr-xr-xt/11_utils.t7
1 files changed, 5 insertions, 2 deletions
diff --git a/t/11_utils.t b/t/11_utils.t
index 6602cb8..f982967 100755
--- a/t/11_utils.t
+++ b/t/11_utils.t
@@ -9,7 +9,8 @@ use Test::More;
use Git::Annex;
use File::Spec::Functions qw(catfile);
use t::Setup;
-use File::Slurp;
+use Storable;
+use Data::Compare;
with_temp_annexes {
my $temp = shift;
@@ -20,7 +21,9 @@ with_temp_annexes {
ok $annex->_unused_cache eq $unused_info,
"_unused_cache resolves to correct path";
$annex->{_unused} = { foo => "bar" };
- write_file $unused_info, "baz\n";
+ $annex->_store_unused_cache;
+ ok Compare($annex->{_unused}, retrieve $unused_info),
+ "_store_unused_cache stores the cache";
$annex->_clear_unused_cache;
ok !exists $annex->{_unused}, "_clear_unused_cache clears unused hashref";
ok !-f $unused_info, "_clear_unused_cache deletes the cache";