summaryrefslogtreecommitdiff
path: root/t/scandir.t
diff options
context:
space:
mode:
Diffstat (limited to 't/scandir.t')
-rw-r--r--t/scandir.t21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/scandir.t b/t/scandir.t
new file mode 100644
index 0000000..622102e
--- /dev/null
+++ b/t/scandir.t
@@ -0,0 +1,21 @@
+#!perl6
+use v6.d;
+use Test;
+use MaildirIndexer::ScanDir;
+
+my BagHash $files;
+
+react {
+ whenever scan-dir('t/fixtures') -> $f {
+ ++$files{$f.path} if $f.f;
+ done if $files.elems == 6;
+ }
+}
+
+is-deeply(
+ $files.keys.sort,
+ $("t/fixtures/one/cur/1", "t/fixtures/one/cur/2", "t/fixtures/one/cur/3", "t/fixtures/one/cur/4", "t/fixtures/two/cur/1", "t/fixtures/two/cur/2"),
+ 'initial scan ok',
+);
+
+done-testing;