summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-23 06:41:49 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-23 06:42:46 +0200
commit4d8618c208f0637321d153821c587f6e35959322 (patch)
tree28688ad8c1374cd8ac420e15142f78ef585ff4a6 /t
parentd737f0e7bc48921960d8a101c4e8d17ec414896a (diff)
Add hashl -f update (update with unignore)
Diffstat (limited to 't')
-rw-r--r--t/29-app-hashl.t15
1 files changed, 13 insertions, 2 deletions
diff --git a/t/29-app-hashl.t b/t/29-app-hashl.t
index e5b6fe3..4fc1a5f 100644
--- a/t/29-app-hashl.t
+++ b/t/29-app-hashl.t
@@ -3,7 +3,7 @@ use strict;
use warnings;
use 5.010;
-use Test::More tests => 35;
+use Test::More tests => 38;
use_ok('App::Hashl');
@@ -84,11 +84,22 @@ $hashl->add_file(
is_deeply([$hashl->files()], [], 'ignored file not added');
-$hashl->unignore('t/in/1k');
+$hashl->unignore($hashl->hash_file('t/in/1k'));
is_deeply([$hashl->ignored()], [$test_hash], 'unignore worked');
ok(
$hashl->add_file(
+ file => 't/in/4',
+ path => 't/in/4',
+ unignore => 1,
+ ),
+ 'Forcefully re-add file to db (unignore => 1)'
+);
+is_deeply([$hashl->ignored()], [], 'add(unignore => 1) unignore worked');
+is_deeply([$hashl->files()], ['t/in/4'], 'add(unignore => 1) add worked');
+
+ok(
+ $hashl->add_file(
file => 't/in/1k',
path => 't/in/1k',
),