On 2016-02-15 01:28:44, SREZIC wrote:
Show quoted text
Attached a possible fix.
From 7b98c8d724cc95b2428a12ad925d64c6c3496d6a Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Mon, 15 Feb 2016 06:29:06 +0000
Subject: [PATCH] fix RT #112031 (files may be in random order)
---
t/02_type.t | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/t/02_type.t b/t/02_type.t
index 2956973..73394be 100644
--- a/t/02_type.t
+++ b/t/02_type.t
@@ -5,22 +5,25 @@ use lib './lib','../lib';
use Test::More tests => 4;
use File::Find::Rule::Type;
-is_deeply( [ find( type => 'image/*', maxdepth => 2, in => 't' ) ],
- [
+
+sub set { +{ map {($_=>1)} @_ } }
+
+is_deeply( set(find( type => 'image/*', maxdepth => 2, in => 't' )),
+ set(
't/happy-baby.JPG',
't/files/blank.bmp',
't/files/blank.gif',
't/files/blank.jpg',
't/files/blank.png',
't/files/blank.tif',
- ] );
+ ) );
-is_deeply ( [ find( type => '*/*zip*', maxdepth => 2, in => 't' ) ],
- [
+is_deeply ( set(find( type => '*/*zip*', maxdepth => 2, in => 't' )),
+ set(
't/files/blank.zip',
't/files/tarball.tar.bz2',
't/files/tarball.tar.gz',
- ] );
+ ) );
is_deeply ( [ find( type => 'audio/x-wav', maxdepth => 2, in => 't/files' ) ],
[ 't/files/rebound.wav' ] );
--
1.7.10.4