From 4d8618c208f0637321d153821c587f6e35959322 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 23 May 2011 06:41:49 +0200 Subject: Add hashl -f update (update with unignore) --- t/29-app-hashl.t | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 't/29-app-hashl.t') 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,9 +84,20 @@ $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', -- cgit v1.2.3