From ee36d55fd62d8a66cfc3fc65f0ca7347e4e94ae0 Mon Sep 17 00:00:00 2001 From: Sterling Hanenkamp Date: Wed, 10 Feb 2016 14:09:32 -0600 Subject: [PATCH] Update META info for PAUSE upload prep Also added missing iterator.t test --- META.info | 17 ----------------- META6.json | 25 +++++++++++++++++++++++++ lib/IO/Glob.pm6 | 2 +- t/iterator.t | 23 +++++++++++++++++++++++ 4 files changed, 49 insertions(+), 18 deletions(-) delete mode 100644 META.info create mode 100644 META6.json create mode 100644 t/iterator.t diff --git a/META.info b/META.info deleted file mode 100644 index 5f68d91..0000000 --- a/META.info +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name" : "IO-Glob", - "version" : "0.1", - "description" : "Glob matching for paths & strings and listing files", - "author" : "Andrew Sterling Hanenkamp", - "provides" : { - "IO::Glob": "lib/IO/Glob.pm6", - "IO::Glob::Globber": "lib/IO/Glob.pm6", - "IO::Glob::Globber::Term": "lib/IO/Glob.pm6", - "IO::Glob::Globber::Match": "lib/IO/Glob.pm6", - "IO::Glob::Globber::Expansion": "lib/IO/Glob.pm6", - "IO::Glob::Simple": "lib/IO/Glob.pm6", - "IO::Glob::BSD": "lib/IO/Glob.pm6" - }, - "depends" : [], - "source-url" : "git://github.com/zostay/perl6-IO-Glob.git" -} diff --git a/META6.json b/META6.json new file mode 100644 index 0000000..730ce90 --- /dev/null +++ b/META6.json @@ -0,0 +1,25 @@ +{ + "perl" : "6", + "name" : "IO::Glob", + "auth" : "github:zostay", + "version" : "v0.1", + "description" : "Glob matching for paths & strings and listing files", + "authors" : [ "Andrew Sterling Hanenkamp " ], + "license" : "Artistic 2.0", + "provides" : { + "IO::Glob": "lib/IO/Glob.pm6", + "IO::Glob::Globber": "lib/IO/Glob.pm6", + "IO::Glob::Globber::Term": "lib/IO/Glob.pm6", + "IO::Glob::Globber::Match": "lib/IO/Glob.pm6", + "IO::Glob::Globber::Expansion": "lib/IO/Glob.pm6", + "IO::Glob::Base": "lib/IO/Glob.pm6", + "IO::Glob::Simple": "lib/IO/Glob.pm6", + "IO::Glob::BSD": "lib/IO/Glob.pm6", + "IO::Glob::SQL": "lib/IO/Glob.pm6" + }, + "depends" : [], + "source" : { + "bugtracker" : "https://github.com/zostay/perl6-IO-Glob/issues", + "source" : "git://github.com/zostay/perl6-IO-Glob.git" + } +} diff --git a/lib/IO/Glob.pm6 b/lib/IO/Glob.pm6 index d0285de..07aaf79 100644 --- a/lib/IO/Glob.pm6 +++ b/lib/IO/Glob.pm6 @@ -1,4 +1,4 @@ -unit class IO::Glob does Iterable; +unit class IO::Glob:auth:ver<0.1> does Iterable; use v6; diff --git a/t/iterator.t b/t/iterator.t new file mode 100644 index 0000000..f26a514 --- /dev/null +++ b/t/iterator.t @@ -0,0 +1,23 @@ +#!perl6 + +use v6; + +use Test; +use IO::Glob; + +{ + my @files = glob('t/fixtures/*.md'); + is @files.elems, 2; + is @files[0], 't/fixtures/bar.md'.IO; + is @files[1], 't/fixtures/foo.md'.IO; +} + +{ + todo 'expansion order should be respected', 3; + my @files = glob('t/fixtures/{foo,bar}.md'); + is @files.elems, 2; + is @files[0], 't/fixtures/foo.md'.IO; + is @files[1], 't/fixtures/bar.md'.IO; +} + +done-testing;