[Pkg-javascript-commits] [node-braces] 01/06: Fix tests using upstream version

Jérémy Lal kapouer at moszumanska.debian.org
Fri Dec 29 14:35:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

kapouer pushed a commit to branch master
in repository node-braces.

commit 03f948bb656b25051075402010191864bb99a02f
Author: Jérémy Lal <kapouer at melix.org>
Date:   Fri Dec 29 15:30:36 2017 +0100

    Fix tests using upstream version
---
 debian/patches/upstream-test-fixes.patch | 934 +++++++++++++++++++++++++++++++
 1 file changed, 934 insertions(+)

diff --git a/debian/patches/upstream-test-fixes.patch b/debian/patches/upstream-test-fixes.patch
new file mode 100644
index 0000000..bf529b6
--- /dev/null
+++ b/debian/patches/upstream-test-fixes.patch
@@ -0,0 +1,934 @@
+Description: backport test fixes from upstream version 2.3.0
+ updating to that version requires modules that are not available at that moment.
+Last-Update: 2017-12-29
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+
+--- a/test/bash.expanded.js
++++ b/test/bash.expanded.js
+@@ -4,9 +4,9 @@
+ var assert = require('assert');
+ var braces = require('..');
+ 
+-function match(pattern, expected, options) {
+-  var actual = braces.expand(pattern, options).sort();
+-  assert.deepEqual(actual, expected.sort(), pattern);
++function equal(pattern, expected, options) {
++  var actual = braces.expand(pattern, options);
++  assert.deepEqual(actual.sort(), expected.sort(), pattern);
+ }
+ 
+ /**
+@@ -14,6 +14,7 @@
+  */
+ 
+ describe('bash.expanded', function() {
++
+   var fixtures = [
+     [ 'a{b,c{1..50}/{foo,bar,baz}/,g}h/i', {}, [ 'abh/i', 'ac1/bar/h/i', 'ac1/baz/h/i', 'ac1/foo/h/i', 'ac10/bar/h/i', 'ac10/baz/h/i', 'ac10/foo/h/i', 'ac11/bar/h/i', 'ac11/baz/h/i', 'ac11/foo/h/i', 'ac12/bar/h/i', 'ac12/baz/h/i', 'ac12/foo/h/i', 'ac13/bar/h/i', 'ac13/baz/h/i', 'ac13/foo/h/i', 'ac14/bar/h/i', 'ac14/baz/h/i', 'ac14/foo/h/i', 'ac15/bar/h/i', 'ac15/baz/h/i', 'ac15/foo/h/i', 'ac16/bar/h/i', 'ac16/baz/h/i', 'ac16/foo/h/i', 'ac17/bar/h/i', 'ac17/baz/h/i', 'ac17/foo/h/i', 'ac1 [...]
+     [ '0{1..9} {10..20}', {}, [ '01 10', '01 11', '01 12', '01 13', '01 14', '01 15', '01 16', '01 17', '01 18', '01 19', '01 20', '02 10', '02 11', '02 12', '02 13', '02 14', '02 15', '02 16', '02 17', '02 18', '02 19', '02 20', '03 10', '03 11', '03 12', '03 13', '03 14', '03 15', '03 16', '03 17', '03 18', '03 19', '03 20', '04 10', '04 11', '04 12', '04 13', '04 14', '04 15', '04 16', '04 17', '04 18', '04 19', '04 20', '05 10', '05 11', '05 12', '05 13', '05 14', '05 15', '05 16',  [...]
+@@ -217,7 +218,7 @@
+     [ 'a{ ,c{d, },h}x', {}, [ 'a x', 'ac x', 'acdx', 'ahx' ] ],
+     [ 'a{ ,c{d, },h} ', {}, [ 'a  ', 'ac  ', 'acd ', 'ah ' ] ],
+ 
+-    'see https://github.com/jonschlinkert/micromatch/issues/66',
++    'see https://github.com/jonschlinkert/microequal/issues/66',
+ 
+     [ '/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.{html,ejs}', {}, [ '/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.ejs', '/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.html' ] ],
+ 
+@@ -248,6 +249,7 @@
+ 
+     [ '{"klklkl"}{1,2,3}', {}, [ '{klklkl}1', '{klklkl}2', '{klklkl}3' ] ],
+     [ '{"x,x"}', {}, [ '{x,x}' ] ],
++    [ '{\'x,x\'}', {}, [ '{x,x}' ] ],
+ 
+     'should escaped outer braces in nested non-sets',
+ 
+@@ -321,8 +323,7 @@
+ 
+     'HEADS UP! If you\'re using the `--mm` flag minimatch freezes on these', 'should expand large numbers',
+ 
+-    [ '{2147483645..2147483649}', { minimatch: false, optimize: true }, [ '2147483645', '2147483646', '2147483647', '2147483648', '2147483649' ] ],
+-    [ '{214748364..2147483649}', { minimatch: false, optimize: true }, [ '(21474836[4-9]|2147483[7-9][0-9]|214748[4-9][0-9]{2}|214749[0-9]{3}|2147[5-9][0-9]{4}|214[8-9][0-9]{5}|21[5-9][0-9]{6}|2[2-9][0-9]{7}|[3-9][0-9]{8}|1[0-9]{9}|20[0-9]{8}|21[0-3][0-9]{7}|214[0-6][0-9]{6}|2147[0-3][0-9]{5}|21474[0-7][0-9]{4}|214748[0-2][0-9]{3}|2147483[0-5][0-9]{2}|21474836[0-4][0-9])' ] ],
++    [ '{2147483645..2147483649}', { minimatch: false }, [ '2147483645', '2147483646', '2147483647', '2147483648', '2147483649' ] ],
+ 
+     'should expand ranges using steps',
+ 
+@@ -405,7 +406,7 @@
+     }
+ 
+     it('should compile: ' + pattern, function() {
+-      match(pattern, expected, options);
++      equal(pattern, expected, options);
+     });
+   });
+ });
+--- a/test/bash.optimized.js
++++ b/test/bash.optimized.js
+@@ -4,7 +4,7 @@
+ var assert = require('assert');
+ var braces = require('..');
+ 
+-function match(pattern, expected, options) {
++function equal(pattern, expected, options) {
+   var actual = braces.optimize(pattern, options).sort();
+   assert.deepEqual(actual, expected.sort(), pattern);
+ }
+@@ -13,7 +13,7 @@
+  * Bash 4.3 unit tests with `braces.optimize()`
+  */
+ 
+-describe('bash.expanded', function() {
++describe('bash.optimized', function() {
+   var fixtures = [
+     ['a{b,c{1..100}/{foo,bar}/,h}x/z', {}, ['a(b|c([1-9]|[1-9][0-9]|100)/(foo|bar)/|h)x/z']],
+     ['0{1..9} {10..20}', {}, ['0([1-9]) (1[0-9]|20)']],
+@@ -78,7 +78,7 @@
+     ['{1..ff}', {}, ['{1..ff}']],
+     ['{1.20..2}', {}, ['{1.20..2}']],
+     ['{10..1}', {}, ['([1-9]|10)']],
+-    ['{214748364..2147483649}', {}, ['(21474836[4-9]|2147483[7-9][0-9]|214748[4-9][0-9]{2}|214749[0-9]{3}|2147[5-9][0-9]{4}|214[8-9][0-9]{5}|21[5-9][0-9]{6}|2[2-9][0-9]{7}|[3-9][0-9]{8}|1[0-9]{9}|20[0-9]{8}|21[0-3][0-9]{7}|214[0-6][0-9]{6}|2147[0-3][0-9]{5}|21474[0-7][0-9]{4}|214748[0-2][0-9]{3}|2147483[0-5][0-9]{2}|21474836[0-4][0-9])']],
++    ['{214748364..2147483649}', {}, ['(21474836[4-9]|2147483[7-9][0-9]|214748[4-9][0-9]{2}|214749[0-9]{3}|2147[5-9][0-9]{4}|214[89][0-9]{5}|21[5-9][0-9]{6}|2[2-9][0-9]{7}|[3-9][0-9]{8}|1[0-9]{9}|20[0-9]{8}|21[0-3][0-9]{7}|214[0-6][0-9]{6}|2147[0-3][0-9]{5}|21474[0-7][0-9]{4}|214748[0-2][0-9]{3}|2147483[0-5][0-9]{2}|21474836[0-4][0-9])']],
+     ['{2147483645..2147483649}', {}, ['(214748364[5-9])']],
+     ['{3..3}', {}, ['3']],
+     ['{5..8}', {}, ['([5-8])']],
+@@ -165,6 +165,7 @@
+     // should not expand braces in sets with es6/bash-like variables
+     ['abc/${ddd}/xyz', {}, ['abc/${ddd}/xyz']],
+     ['a${b}c', {}, ['a${b}c']],
++    ['a${b{a,b}}c', {}, ['a${b{a,b}}c']],
+     ['a/{${b},c}/d', {}, ['a/(${b}|c)/d']],
+     ['a${b,d}/{foo,bar}c', {}, ['a${b,d}/(foo|bar)c']],
+ 
+@@ -231,7 +232,7 @@
+     ['a{ ,c{d, },h}x', {}, ['a( |c(d| )|h)x']],
+     ['a{ ,c{d, },h} ', {}, ['a( |c(d| )|h) ']],
+ 
+-    // see https://github.com/jonschlinkert/micromatch/issues/66
++    // see https://github.com/jonschlinkert/microequal/issues/66
+     ['/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.{html,ejs}', {}, ['/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.(html|ejs)']],
+ 
+     /**
+@@ -331,7 +332,7 @@
+     // HEADS UP! If you're using the `--mm` flag minimatch freezes on these
+     // should expand large numbers
+     ['{2147483645..2147483649}', {}, ['(214748364[5-9])']],
+-    ['{214748364..2147483649}', {}, ['(21474836[4-9]|2147483[7-9][0-9]|214748[4-9][0-9]{2}|214749[0-9]{3}|2147[5-9][0-9]{4}|214[8-9][0-9]{5}|21[5-9][0-9]{6}|2[2-9][0-9]{7}|[3-9][0-9]{8}|1[0-9]{9}|20[0-9]{8}|21[0-3][0-9]{7}|214[0-6][0-9]{6}|2147[0-3][0-9]{5}|21474[0-7][0-9]{4}|214748[0-2][0-9]{3}|2147483[0-5][0-9]{2}|21474836[0-4][0-9])']],
++    ['{214748364..2147483649}', {}, ['(21474836[4-9]|2147483[7-9][0-9]|214748[4-9][0-9]{2}|214749[0-9]{3}|2147[5-9][0-9]{4}|214[89][0-9]{5}|21[5-9][0-9]{6}|2[2-9][0-9]{7}|[3-9][0-9]{8}|1[0-9]{9}|20[0-9]{8}|21[0-3][0-9]{7}|214[0-6][0-9]{6}|2147[0-3][0-9]{5}|21474[0-7][0-9]{4}|214748[0-2][0-9]{3}|2147483[0-5][0-9]{2}|21474836[0-4][0-9])']],
+ 
+     // should expand ranges using steps
+     ['{1..10..1}', {bash: false}, ['([1-9]|10)']],
+@@ -403,7 +404,7 @@
+     }
+ 
+     it('should compile: ' + pattern, function() {
+-      match(pattern, expected, options);
++      equal(pattern, expected, options);
+     });
+   });
+ });
+--- a/test/expanded.ranges.js
++++ b/test/expanded.ranges.js
+@@ -3,7 +3,7 @@
+ var assert = require('assert');
+ var braces = require('..');
+ 
+-function match(pattern, expected) {
++function equal(pattern, expected) {
+   var actual = braces.expand(pattern).sort();
+   assert.deepEqual(actual, expected.sort());
+ }
+@@ -11,177 +11,169 @@
+ describe('expanded ranges', function() {
+   describe('escaping / invalid ranges', function() {
+     it('should not try to expand ranges with decimals', function() {
+-      match('{1.1..2.1}', ['{1.1..2.1}']);
+-      match('{1.1..~2.1}', ['{1.1..~2.1}']);
++      equal('{1.1..2.1}', ['{1.1..2.1}']);
++      equal('{1.1..~2.1}', ['{1.1..~2.1}']);
+     });
+ 
+     it('should escape invalid ranges:', function() {
+-      match('{1..0f}', ['{1..0f}']);
+-      match('{1..10..ff}', ['{1..10..ff}']);
+-      match('{1..10.f}', ['{1..10.f}']);
+-      match('{1..10f}', ['{1..10f}']);
+-      match('{1..20..2f}', ['{1..20..2f}']);
+-      match('{1..20..f2}', ['{1..20..f2}']);
+-      match('{1..2f..2}', ['{1..2f..2}']);
+-      match('{1..ff..2}', ['{1..ff..2}']);
+-      match('{1..ff}', ['{1..ff}']);
+-      match('{1.20..2}', ['{1.20..2}']);
++      equal('{1..0f}', ['{1..0f}']);
++      equal('{1..10..ff}', ['{1..10..ff}']);
++      equal('{1..10.f}', ['{1..10.f}']);
++      equal('{1..10f}', ['{1..10f}']);
++      equal('{1..20..2f}', ['{1..20..2f}']);
++      equal('{1..20..f2}', ['{1..20..f2}']);
++      equal('{1..2f..2}', ['{1..2f..2}']);
++      equal('{1..ff..2}', ['{1..ff..2}']);
++      equal('{1..ff}', ['{1..ff}']);
++      equal('{1.20..2}', ['{1.20..2}']);
+     });
+ 
+     it('weirdly-formed brace expansions -- fixed in post-bash-3.1', function() {
+-      match('a-{b{d,e}}-c', ['a-{bd}-c', 'a-{be}-c']);
+-      match('a-{bdef-{g,i}-c', ['a-{bdef-g-c', 'a-{bdef-i-c']);
++      equal('a-{b{d,e}}-c', ['a-{bd}-c', 'a-{be}-c']);
++      equal('a-{bdef-{g,i}-c', ['a-{bdef-g-c', 'a-{bdef-i-c']);
+     });
+ 
+     it('should not expand quoted strings.', function() {
+-      match('{"klklkl"}{1,2,3}', ['{klklkl}1', '{klklkl}2', '{klklkl}3']);
+-      match('{"x,x"}', ['{x,x}']);
++      equal('{"klklkl"}{1,2,3}', ['{klklkl}1', '{klklkl}2', '{klklkl}3']);
++      equal('{"x,x"}', ['{x,x}']);
+     });
+ 
+     it('should escaped outer braces in nested non-sets', function() {
+-      match('{a-{b,c,d}}', ['{a-b}', '{a-c}', '{a-d}']);
+-      match('{a,{a-{b,c,d}}}', ['a', '{a-b}', '{a-c}', '{a-d}']);
++      equal('{a-{b,c,d}}', ['{a-b}', '{a-c}', '{a-d}']);
++      equal('{a,{a-{b,c,d}}}', ['a', '{a-b}', '{a-c}', '{a-d}']);
+     });
+ 
+     it('should escape imbalanced braces', function() {
+-      match('a-{bdef-{g,i}-c', ['a-{bdef-g-c', 'a-{bdef-i-c']);
+-      match('abc{', ['abc{']);
+-      match('{abc{', ['{abc{']);
+-      match('{abc', ['{abc']);
+-      match('}abc', ['}abc']);
+-      match('ab{c', ['ab{c']);
+-      match('ab{c', ['ab{c']);
+-      match('{{a,b}', ['{a', '{b']);
+-      match('{a,b}}', ['a}', 'b}']);
+-      match('abcd{efgh', ['abcd{efgh']);
+-      match('a{b{c{d,e}f}g}h', ['a{b{cdf}g}h', 'a{b{cef}g}h']);
+-      match('f{x,y{{g,z}}h}', ['fx', 'fy{g}h', 'fy{z}h']);
+-      match('z{a,b},c}d', ['za,c}d', 'zb,c}d']);
+-      match('a{b{c{d,e}f{x,y{{g}h', ['a{b{cdf{x,y{{g}h', 'a{b{cef{x,y{{g}h']);
+-      match('f{x,y{{g}h', ['f{x,y{{g}h']);
+-      match('f{x,y{{g}}h', ['f{x,y{{g}}h']);
+-      match('a{b{c{d,e}f{x,y{}g}h', ['a{b{cdfxh', 'a{b{cdfy{}gh', 'a{b{cefxh', 'a{b{cefy{}gh']);
+-      match('f{x,y{}g}h', ['fxh', 'fy{}gh']);
+-      match('z{a,b{,c}d', ['z{a,bd', 'z{a,bcd']);
++      equal('a-{bdef-{g,i}-c', ['a-{bdef-g-c', 'a-{bdef-i-c']);
++      equal('abc{', ['abc{']);
++      equal('{abc{', ['{abc{']);
++      equal('{abc', ['{abc']);
++      equal('}abc', ['}abc']);
++      equal('ab{c', ['ab{c']);
++      equal('ab{c', ['ab{c']);
++      equal('{{a,b}', ['{a', '{b']);
++      equal('{a,b}}', ['a}', 'b}']);
++      equal('abcd{efgh', ['abcd{efgh']);
++      equal('a{b{c{d,e}f}g}h', ['a{b{cdf}g}h', 'a{b{cef}g}h']);
++      equal('f{x,y{{g,z}}h}', ['fx', 'fy{g}h', 'fy{z}h']);
++      equal('z{a,b},c}d', ['za,c}d', 'zb,c}d']);
++      equal('a{b{c{d,e}f{x,y{{g}h', ['a{b{cdf{x,y{{g}h', 'a{b{cef{x,y{{g}h']);
++      equal('f{x,y{{g}h', ['f{x,y{{g}h']);
++      equal('f{x,y{{g}}h', ['f{x,y{{g}}h']);
++      equal('a{b{c{d,e}f{x,y{}g}h', ['a{b{cdfxh', 'a{b{cdfy{}gh', 'a{b{cefxh', 'a{b{cefy{}gh']);
++      equal('f{x,y{}g}h', ['fxh', 'fy{}gh']);
++      equal('z{a,b{,c}d', ['z{a,bd', 'z{a,bcd']);
+     });
+   });
+ 
+   describe('positive numeric ranges', function() {
+     it('should expand numeric ranges', function() {
+-      match('a{0..3}d', ['a0d', 'a1d', 'a2d', 'a3d']);
+-      match('x{10..1}y', ['x10y', 'x9y', 'x8y', 'x7y', 'x6y', 'x5y', 'x4y', 'x3y', 'x2y', 'x1y']);
+-      match('x{3..3}y', ['x3y']);
+-      match('{1..10}', ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']);
+-      match('{1..3}', ['1', '2', '3']);
+-      match('{1..9}', ['1', '2', '3', '4', '5', '6', '7', '8', '9']);
+-      match('{10..1}', ['10', '9', '8', '7', '6', '5', '4', '3', '2', '1']);
+-      match('{10..1}y', ['10y', '9y', '8y', '7y', '6y', '5y', '4y', '3y', '2y', '1y']);
+-      match('{3..3}', ['3']);
+-      match('{5..8}', ['5', '6', '7', '8']);
++      equal('a{0..3}d', ['a0d', 'a1d', 'a2d', 'a3d']);
++      equal('x{10..1}y', ['x10y', 'x9y', 'x8y', 'x7y', 'x6y', 'x5y', 'x4y', 'x3y', 'x2y', 'x1y']);
++      equal('x{3..3}y', ['x3y']);
++      equal('{1..10}', ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']);
++      equal('{1..3}', ['1', '2', '3']);
++      equal('{1..9}', ['1', '2', '3', '4', '5', '6', '7', '8', '9']);
++      equal('{10..1}', ['10', '9', '8', '7', '6', '5', '4', '3', '2', '1']);
++      equal('{10..1}y', ['10y', '9y', '8y', '7y', '6y', '5y', '4y', '3y', '2y', '1y']);
++      equal('{3..3}', ['3']);
++      equal('{5..8}', ['5', '6', '7', '8']);
+     });
+   });
+ 
+   describe('negative ranges', function() {
+     it('should expand ranges with negative numbers', function() {
+-      match('{-10..-1}', ['-10', '-9', '-8', '-7', '-6', '-5', '-4', '-3', '-2', '-1']);
+-      match('{-20..0}', ['-20', '-19', '-18', '-17', '-16', '-15', '-14', '-13', '-12', '-11', '-10', '-9', '-8', '-7', '-6', '-5', '-4', '-3', '-2', '-1', '0']);
+-      match('{0..-5}', ['0', '-1', '-2', '-3', '-4', '-5']);
+-      match('{9..-4}', ['9', '8', '7', '6', '5', '4', '3', '2', '1', '0', '-1', '-2', '-3', '-4']);
++      equal('{-10..-1}', ['-10', '-9', '-8', '-7', '-6', '-5', '-4', '-3', '-2', '-1']);
++      equal('{-20..0}', ['-20', '-19', '-18', '-17', '-16', '-15', '-14', '-13', '-12', '-11', '-10', '-9', '-8', '-7', '-6', '-5', '-4', '-3', '-2', '-1', '0']);
++      equal('{0..-5}', ['0', '-1', '-2', '-3', '-4', '-5']);
++      equal('{9..-4}', ['9', '8', '7', '6', '5', '4', '3', '2', '1', '0', '-1', '-2', '-3', '-4']);
+     });
+   });
+ 
+   describe('alphabetical ranges', function() {
+     it('should expand alphabetical ranges', function() {
+-      match('{a..F}', ['F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a']);
+-      match('0{a..d}0', ['0a0', '0b0', '0c0', '0d0']);
+-      match('a/{b..d}/e', ['a/b/e', 'a/c/e', 'a/d/e']);
+-      match('{1..f}', ['1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f']);
+-      match('{a..A}', ['a', '`', '_', '^', ']', '\\', '[', 'Z', 'Y', 'X', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', 'J', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A']);
+-      match('{A..a}', ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a']);
+-      match('{a..e}', ['a', 'b', 'c', 'd', 'e']);
+-      match('{A..E}', ['A', 'B', 'C', 'D', 'E']);
+-      match('{a..f}', ['a', 'b', 'c', 'd', 'e', 'f']);
+-      match('{a..z}', ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']);
+-      match('{E..A}', ['E', 'D', 'C', 'B', 'A']);
+-      match('{f..1}', ['f', 'e', 'd', 'c', 'b', 'a', '`', '_', '^', ']', '\\', '[', 'Z', 'Y', 'X', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', 'J', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A', '@', '?', '>', '=', '<', ';', ':', '9', '8', '7', '6', '5', '4', '3', '2', '1']);
+-      match('{f..a}', ['f', 'e', 'd', 'c', 'b', 'a']);
+-      match('{f..f}', ['f']);
++      equal('{a..F}', ['F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a']);
++      equal('0{a..d}0', ['0a0', '0b0', '0c0', '0d0']);
++      equal('a/{b..d}/e', ['a/b/e', 'a/c/e', 'a/d/e']);
++      equal('{1..f}', ['1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f']);
++      equal('{a..A}', ['a', '`', '_', '^', ']', '\\', '[', 'Z', 'Y', 'X', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', 'J', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A']);
++      equal('{A..a}', ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a']);
++      equal('{a..e}', ['a', 'b', 'c', 'd', 'e']);
++      equal('{A..E}', ['A', 'B', 'C', 'D', 'E']);
++      equal('{a..f}', ['a', 'b', 'c', 'd', 'e', 'f']);
++      equal('{a..z}', ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']);
++      equal('{E..A}', ['E', 'D', 'C', 'B', 'A']);
++      equal('{f..1}', ['f', 'e', 'd', 'c', 'b', 'a', '`', '_', '^', ']', '\\', '[', 'Z', 'Y', 'X', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', 'J', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A', '@', '?', '>', '=', '<', ';', ':', '9', '8', '7', '6', '5', '4', '3', '2', '1']);
++      equal('{f..a}', ['f', 'e', 'd', 'c', 'b', 'a']);
++      equal('{f..f}', ['f']);
+     });
+ 
+     it('should expand multiple ranges:', function() {
+-      match('a/{b..d}/e/{f..h}', ['a/b/e/f', 'a/b/e/g', 'a/b/e/h', 'a/c/e/f', 'a/c/e/g', 'a/c/e/h', 'a/d/e/f', 'a/d/e/g', 'a/d/e/h']);
++      equal('a/{b..d}/e/{f..h}', ['a/b/e/f', 'a/b/e/g', 'a/b/e/h', 'a/c/e/f', 'a/c/e/g', 'a/c/e/h', 'a/d/e/f', 'a/d/e/g', 'a/d/e/h']);
+     });
+   });
+ 
+   describe('combo', function() {
+     it('should expand numerical ranges - positive and negative', function() {
+-      match('a{01..05}b', ['a01b', 'a02b', 'a03b', 'a04b', 'a05b' ]);
+-      match('0{1..9}/{10..20}', ['01/10', '01/11', '01/12', '01/13', '01/14', '01/15', '01/16', '01/17', '01/18', '01/19', '01/20', '02/10', '02/11', '02/12', '02/13', '02/14', '02/15', '02/16', '02/17', '02/18', '02/19', '02/20', '03/10', '03/11', '03/12', '03/13', '03/14', '03/15', '03/16', '03/17', '03/18', '03/19', '03/20', '04/10', '04/11', '04/12', '04/13', '04/14', '04/15', '04/16', '04/17', '04/18', '04/19', '04/20', '05/10', '05/11', '05/12', '05/13', '05/14', '05/15', '05/16', [...]
+-      match('{-10..10}', ['-1', '-10', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '0', '1', '10', '2', '3', '4', '5', '6', '7', '8', '9' ]);
+-    });
+-  });
+-
+-  // HEADS UP! If you're using the `--mm` flag minimatch freezes on these
+-  describe('large numbers', function() {
+-    it('should expand large numbers', function() {
+-      match('{2147483645..2147483649}', ['2147483645', '2147483646', '2147483647', '2147483648', '2147483649']);
+-      match('{214748364..2147483649}', ['(21474836[4-9]|2147483[7-9][0-9]|214748[4-9][0-9]{2}|214749[0-9]{3}|2147[5-9][0-9]{4}|214[8-9][0-9]{5}|21[5-9][0-9]{6}|2[2-9][0-9]{7}|[3-9][0-9]{8}|1[0-9]{9}|20[0-9]{8}|21[0-3][0-9]{7}|214[0-6][0-9]{6}|2147[0-3][0-9]{5}|21474[0-7][0-9]{4}|214748[0-2][0-9]{3}|2147483[0-5][0-9]{2}|21474836[0-4][0-9])']);
++      equal('a{01..05}b', ['a01b', 'a02b', 'a03b', 'a04b', 'a05b' ]);
++      equal('0{1..9}/{10..20}', ['01/10', '01/11', '01/12', '01/13', '01/14', '01/15', '01/16', '01/17', '01/18', '01/19', '01/20', '02/10', '02/11', '02/12', '02/13', '02/14', '02/15', '02/16', '02/17', '02/18', '02/19', '02/20', '03/10', '03/11', '03/12', '03/13', '03/14', '03/15', '03/16', '03/17', '03/18', '03/19', '03/20', '04/10', '04/11', '04/12', '04/13', '04/14', '04/15', '04/16', '04/17', '04/18', '04/19', '04/20', '05/10', '05/11', '05/12', '05/13', '05/14', '05/15', '05/16', [...]
++      equal('{-10..10}', ['-1', '-10', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '0', '1', '10', '2', '3', '4', '5', '6', '7', '8', '9' ]);
+     });
+   });
+ 
+   describe('steps > positive ranges', function() {
+     it('should expand ranges using steps:', function() {
+-      match('{1..10..1}', ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']);
+-      match('{1..10..2}', ['1', '3', '5', '7', '9']);
+-      match('{1..20..20}', ['1']);
+-      match('{1..20..2}', ['1', '3', '5', '7', '9', '11', '13', '15', '17', '19']);
+-      match('{10..0..2}', ['10', '8', '6', '4', '2', '0']);
+-      match('{10..1..2}', ['10', '8', '6', '4', '2']);
+-      match('{100..0..5}', ['100', '95', '90', '85', '80', '75', '70', '65', '60', '55', '50', '45', '40', '35', '30', '25', '20', '15', '10', '5', '0']);
+-      match('{2..10..1}', ['2', '3', '4', '5', '6', '7', '8', '9', '10']);
+-      match('{2..10..2}', ['2', '4', '6', '8', '10']);
+-      match('{2..10..3}', ['2', '5', '8']);
+-      match('{a..z..2}', ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y']);
++      equal('{1..10..1}', ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']);
++      equal('{1..10..2}', ['1', '3', '5', '7', '9']);
++      equal('{1..20..20}', ['1']);
++      equal('{1..20..2}', ['1', '3', '5', '7', '9', '11', '13', '15', '17', '19']);
++      equal('{10..0..2}', ['10', '8', '6', '4', '2', '0']);
++      equal('{10..1..2}', ['10', '8', '6', '4', '2']);
++      equal('{100..0..5}', ['100', '95', '90', '85', '80', '75', '70', '65', '60', '55', '50', '45', '40', '35', '30', '25', '20', '15', '10', '5', '0']);
++      equal('{2..10..1}', ['2', '3', '4', '5', '6', '7', '8', '9', '10']);
++      equal('{2..10..2}', ['2', '4', '6', '8', '10']);
++      equal('{2..10..3}', ['2', '5', '8']);
++      equal('{a..z..2}', ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y']);
+     });
+ 
+     it('should expand positive ranges with negative steps:', function() {
+-      match('{10..0..-2}', ['10', '8', '6', '4', '2', '0']);
++      equal('{10..0..-2}', ['10', '8', '6', '4', '2', '0']);
+     });
+   });
+ 
+   describe('steps > negative ranges', function() {
+     it('should expand negative ranges using steps:', function() {
+-      match('{-1..-10..-2}', ['-1', '-3', '-5', '-7', '-9']);
+-      match('{-1..-10..2}', ['-1', '-3', '-5', '-7', '-9']);
+-      match('{-10..-2..2}', ['-10', '-8', '-6', '-4', '-2']);
+-      match('{-2..-10..1}', ['-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10']);
+-      match('{-2..-10..2}', ['-2', '-4', '-6', '-8', '-10']);
+-      match('{-2..-10..3}', ['-2', '-5', '-8']);
+-      match('{-50..-0..5}', ['-50', '-45', '-40', '-35', '-30', '-25', '-20', '-15', '-10', '-5', '0']);
+-      match('{10..1..-2}', ['2', '4', '6', '8', '10']);
+-      match('{100..0..-5}', ['100', '95', '90', '85', '80', '75', '70', '65', '60', '55', '50', '45', '40', '35', '30', '25', '20', '15', '10', '5', '0']);
++      equal('{-1..-10..-2}', ['-1', '-3', '-5', '-7', '-9']);
++      equal('{-1..-10..2}', ['-1', '-3', '-5', '-7', '-9']);
++      equal('{-10..-2..2}', ['-10', '-8', '-6', '-4', '-2']);
++      equal('{-2..-10..1}', ['-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10']);
++      equal('{-2..-10..2}', ['-2', '-4', '-6', '-8', '-10']);
++      equal('{-2..-10..3}', ['-2', '-5', '-8']);
++      equal('{-50..-0..5}', ['-50', '-45', '-40', '-35', '-30', '-25', '-20', '-15', '-10', '-5', '0']);
++      equal('{10..1..-2}', ['2', '4', '6', '8', '10']);
++      equal('{100..0..-5}', ['100', '95', '90', '85', '80', '75', '70', '65', '60', '55', '50', '45', '40', '35', '30', '25', '20', '15', '10', '5', '0']);
+     });
+   });
+ 
+   describe('steps > alphabetical ranges', function() {
+     it('should expand alpha ranges with steps', function() {
+-      match('{a..e..2}', ['a', 'c', 'e']);
+-      match('{E..A..2}', ['E', 'C', 'A']);
+-      match('{a..z}', ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']);
+-      match('{a..z..2}', ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y']);
+-      match('{z..a..-2}', ['z', 'x', 'v', 't', 'r', 'p', 'n', 'l', 'j', 'h', 'f', 'd', 'b']);
++      equal('{a..e..2}', ['a', 'c', 'e']);
++      equal('{E..A..2}', ['E', 'C', 'A']);
++      equal('{a..z}', ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']);
++      equal('{a..z..2}', ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y']);
++      equal('{z..a..-2}', ['z', 'x', 'v', 't', 'r', 'p', 'n', 'l', 'j', 'h', 'f', 'd', 'b']);
+     });
+ 
+     it('should expand alpha ranges with negative steps', function() {
+-      match('{z..a..-2}', ['z', 'x', 'v', 't', 'r', 'p', 'n', 'l', 'j', 'h', 'f', 'd', 'b']);
++      equal('{z..a..-2}', ['z', 'x', 'v', 't', 'r', 'p', 'n', 'l', 'j', 'h', 'f', 'd', 'b']);
+     });
+   });
+ 
+   describe('padding', function() {
+     it('unwanted zero-padding -- fixed post-bash-4.0', function() {
+-      match('{10..0..2}', ['10', '8', '6', '4', '2', '0']);
+-      match('{10..0..-2}', ['10', '8', '6', '4', '2', '0']);
+-      match('{-50..-0..5}', ['-50', '-45', '-40', '-35', '-30', '-25', '-20', '-15', '-10', '-5', '0']);
++      equal('{10..0..2}', ['10', '8', '6', '4', '2', '0']);
++      equal('{10..0..-2}', ['10', '8', '6', '4', '2', '0']);
++      equal('{-50..-0..5}', ['-50', '-45', '-40', '-35', '-30', '-25', '-20', '-15', '-10', '-5', '0']);
+     });
+   });
+ });
+--- a/test/optimized.js
++++ b/test/optimized.js
+@@ -11,7 +11,7 @@
+ var assert = require('assert');
+ var braces = require('..');
+ 
+-function match(pattern, expected, options) {
++function equal(pattern, expected, options) {
+   assert.deepEqual(braces(pattern, options), expected);
+ }
+ 
+@@ -19,129 +19,129 @@
+   describe('sets', function() {
+     describe('invalid sets', function() {
+       it('should handle invalid sets:', function() {
+-        match('{0..10,braces}', ['(0..10|braces)']);
+-        match('{1..10,braces}', ['(1..10|braces)']);
++        equal('{0..10,braces}', ['(0..10|braces)']);
++        equal('{1..10,braces}', ['(1..10|braces)']);
+       });
+     });
+ 
+     describe('escaping', function() {
+       it('should not expand escaped braces', function() {
+-        match('\\{a,b,c,d,e}', ['{a,b,c,d,e}']);
+-        match('a/b/c/{x,y\\}', ['a/b/c/{x,y}']);
+-        match('a/\\{x,y}/cde', ['a/{x,y}/cde']);
+-        match('abcd{efgh', ['abcd{efgh']);
+-        match('{abc}', ['{abc}']);
+-        match('{x,y,\\{a,b,c\\}}', ['(x|y|{a|b|c})']);
+-        match('{x,y,{a,b,c\\}}', ['{x,y,(a|b|c})']);
+-        match('{x,y,{abc},trie}', ['(x|y|{abc}|trie)']);
+-        match('{x\\,y,\\{abc\\},trie}', ['(x,y|{abc}|trie)']);
++        equal('\\{a,b,c,d,e}', ['{a,b,c,d,e}']);
++        equal('a/b/c/{x,y\\}', ['a/b/c/{x,y}']);
++        equal('a/\\{x,y}/cde', ['a/{x,y}/cde']);
++        equal('abcd{efgh', ['abcd{efgh']);
++        equal('{abc}', ['{abc}']);
++        equal('{x,y,\\{a,b,c\\}}', ['(x|y|{a|b|c})']);
++        equal('{x,y,{a,b,c\\}}', ['{x,y,(a|b|c})']);
++        equal('{x,y,{abc},trie}', ['(x|y|{abc}|trie)']);
++        equal('{x\\,y,\\{abc\\},trie}', ['(x,y|{abc}|trie)']);
+       });
+ 
+       it('should handle spaces', function() {
+         // Bash 4.3 says the following should be equivalent to `foo|(1|2)|bar`,
+         // That makes sense in Bash, since ' ' is a separator, but not here.
+-        match('foo {1,2} bar', ['foo (1|2) bar']);
++        equal('foo {1,2} bar', ['foo (1|2) bar']);
+       });
+ 
+       it('should handle empty braces', function() {
+-        match('{ }', ['{ }']);
+-        match('{', ['{']);
+-        match('{}', ['{}']);
+-        match('}', ['}']);
++        equal('{ }', ['{ }']);
++        equal('{', ['{']);
++        equal('{}', ['{}']);
++        equal('}', ['}']);
+       });
+ 
+       it('should escape braces when only one value is defined', function() {
+-        match('a{b}c', ['a{b}c']);
+-        match('a/b/c{d}e', ['a/b/c{d}e']);
++        equal('a{b}c', ['a{b}c']);
++        equal('a/b/c{d}e', ['a/b/c{d}e']);
+       });
+ 
+       it('should not expand braces in sets with es6/bash-like variables', function() {
+-        match('abc/${ddd}/xyz', ['abc/${ddd}/xyz']);
+-        match('a${b}c', ['a${b}c']);
+-        match('a/{${b},c}/d', ['a/(${b}|c)/d']);
+-        match('a${b,d}/{foo,bar}c', ['a${b,d}/(foo|bar)c']);
++        equal('abc/${ddd}/xyz', ['abc/${ddd}/xyz']);
++        equal('a${b}c', ['a${b}c']);
++        equal('a/{${b},c}/d', ['a/(${b}|c)/d']);
++        equal('a${b,d}/{foo,bar}c', ['a${b,d}/(foo|bar)c']);
+       });
+ 
+       it('should not expand escaped commas.', function() {
+-        match('a{b\\,c\\,d}e', ['a{b,c,d}e']);
+-        match('a{b\\,c}d', ['a{b,c}d']);
+-        match('{abc\\,def}', ['{abc,def}']);
+-        match('{abc\\,def,ghi}', ['(abc,def|ghi)']);
+-        match('a/{b,c}/{x\\,y}/d/e', ['a/(b|c)/{x,y}/d/e']);
++        equal('a{b\\,c\\,d}e', ['a{b,c,d}e']);
++        equal('a{b\\,c}d', ['a{b,c}d']);
++        equal('{abc\\,def}', ['{abc,def}']);
++        equal('{abc\\,def,ghi}', ['(abc,def|ghi)']);
++        equal('a/{b,c}/{x\\,y}/d/e', ['a/(b|c)/{x,y}/d/e']);
+       });
+ 
+       it('should return sets with escaped commas', function() {
+-        match('a/{b,c}/{x\\,y}/d/e', ['a/(b|c)/{x,y}/d/e']);
++        equal('a/{b,c}/{x\\,y}/d/e', ['a/(b|c)/{x,y}/d/e']);
+       });
+ 
+       it('should not expand escaped braces.', function() {
+-        match('{a,b\\}c,d}', ['(a|b}c|d)']);
+-        match('\\{a,b,c,d,e}', ['{a,b,c,d,e}']);
+-        match('a/{z,\\{a,b,c,d,e}/d', ['a/(z|{a|b|c|d|e)/d']);
+-        match('a/\\{b,c}/{d,e}/f', ['a/{b,c}/(d|e)/f']);
+-        match('./\\{x,y}/{a..z..3}/', ['./{x,y}/(a|d|g|j|m|p|s|v|y)/']);
++        equal('{a,b\\}c,d}', ['(a|b}c|d)']);
++        equal('\\{a,b,c,d,e}', ['{a,b,c,d,e}']);
++        equal('a/{z,\\{a,b,c,d,e}/d', ['a/(z|{a|b|c|d|e)/d']);
++        equal('a/\\{b,c}/{d,e}/f', ['a/{b,c}/(d|e)/f']);
++        equal('./\\{x,y}/{a..z..3}/', ['./{x,y}/(a|d|g|j|m|p|s|v|y)/']);
+       });
+ 
+       it('should not expand escaped braces or commas.', function() {
+-        match('{x\\,y,\\{abc\\},trie}', ['(x,y|{abc}|trie)']);
++        equal('{x\\,y,\\{abc\\},trie}', ['(x,y|{abc}|trie)']);
+       });
+     });
+ 
+     describe('set expansion', function() {
+       it('should support sequence brace operators', function() {
+-        match('/usr/{ucb/{ex,edit},lib/{ex,how_ex}}', ['/usr/(ucb/(ex|edit)|lib/(ex|how_ex))']);
+-        match('ff{c,b,a}', ['ff(c|b|a)']);
+-        match('f{d,e,f}g', ['f(d|e|f)g']);
+-        match('x{{0..10},braces}y', ['x(([0-9]|10)|braces)y']);
+-        match('{1..10}', ['([1-9]|10)']);
+-        match('{a,b,c}', ['(a|b|c)']);
+-        match('{braces,{0..10}}', ['(braces|([0-9]|10))']);
+-        match('{l,n,m}xyz', ['(l|n|m)xyz']);
+-        match('{{0..10},braces}', ['(([0-9]|10)|braces)']);
+-        match('{{1..10..2},braces}', ['((1|3|5|7|9)|braces)']);
+-        match('{{1..10},braces}', ['(([1-9]|10)|braces)']);
++        equal('/usr/{ucb/{ex,edit},lib/{ex,how_ex}}', ['/usr/(ucb/(ex|edit)|lib/(ex|how_ex))']);
++        equal('ff{c,b,a}', ['ff(c|b|a)']);
++        equal('f{d,e,f}g', ['f(d|e|f)g']);
++        equal('x{{0..10},braces}y', ['x(([0-9]|10)|braces)y']);
++        equal('{1..10}', ['([1-9]|10)']);
++        equal('{a,b,c}', ['(a|b|c)']);
++        equal('{braces,{0..10}}', ['(braces|([0-9]|10))']);
++        equal('{l,n,m}xyz', ['(l|n|m)xyz']);
++        equal('{{0..10},braces}', ['(([0-9]|10)|braces)']);
++        equal('{{1..10..2},braces}', ['((1|3|5|7|9)|braces)']);
++        equal('{{1..10},braces}', ['(([1-9]|10)|braces)']);
+       });
+ 
+       it('should expand multiple sets', function() {
+-        match('a/{a,b}/{c,d}/e', ['a/(a|b)/(c|d)/e']);
+-        match('a{b,c}d{e,f}g', ['a(b|c)d(e|f)g']);
+-        match('a/{x,y}/c{d,e}f.{md,txt}', ['a/(x|y)/c(d|e)f.(md|txt)']);
++        equal('a/{a,b}/{c,d}/e', ['a/(a|b)/(c|d)/e']);
++        equal('a{b,c}d{e,f}g', ['a(b|c)d(e|f)g']);
++        equal('a/{x,y}/c{d,e}f.{md,txt}', ['a/(x|y)/c(d|e)f.(md|txt)']);
+       });
+ 
+       it('should expand nested sets', function() {
+-        match('{a,b}{{a,b},a,b}', ['(a|b)((a|b)|a|b)']);
+-        match('a{b,c{d,e}f}g', ['a(b|c(d|e)f)g']);
+-        match('a{{x,y},z}b', ['a((x|y)|z)b']);
+-        match('f{x,y{g,z}}h', ['f(x|y(g|z))h']);
+-        match('a{b,c}{d,e}/hx/z', ['a(b|c)(d|e)/hx/z']);
+-        match('a{b,c{d,e},h}x/z', ['a(b|c(d|e)|h)x/z']);
+-        match('a{b,c{d,e},h}x{y,z}', ['a(b|c(d|e)|h)x(y|z)']);
+-        match('a{b,c{d,e},{f,g}h}x{y,z}', ['a(b|c(d|e)|(f|g)h)x(y|z)']);
+-        match('a-{b{d,e}}-c', ['a-{b(d|e)}-c']);
++        equal('{a,b}{{a,b},a,b}', ['(a|b)((a|b)|a|b)']);
++        equal('a{b,c{d,e}f}g', ['a(b|c(d|e)f)g']);
++        equal('a{{x,y},z}b', ['a((x|y)|z)b']);
++        equal('f{x,y{g,z}}h', ['f(x|y(g|z))h']);
++        equal('a{b,c}{d,e}/hx/z', ['a(b|c)(d|e)/hx/z']);
++        equal('a{b,c{d,e},h}x/z', ['a(b|c(d|e)|h)x/z']);
++        equal('a{b,c{d,e},h}x{y,z}', ['a(b|c(d|e)|h)x(y|z)']);
++        equal('a{b,c{d,e},{f,g}h}x{y,z}', ['a(b|c(d|e)|(f|g)h)x(y|z)']);
++        equal('a-{b{d,e}}-c', ['a-{b(d|e)}-c']);
+       });
+ 
+       it('should expand not modify non-brace characters', function() {
+-        match('a/b/{d,e}/*.js', ['a/b/(d|e)/*.js']);
+-        match('a/**/c/{d,e}/f*.js', ['a/**/c/(d|e)/f*.js']);
+-        match('a/**/c/{d,e}/f*.{md,txt}', ['a/**/c/(d|e)/f*.(md|txt)']);
++        equal('a/b/{d,e}/*.js', ['a/b/(d|e)/*.js']);
++        equal('a/**/c/{d,e}/f*.js', ['a/**/c/(d|e)/f*.js']);
++        equal('a/**/c/{d,e}/f*.{md,txt}', ['a/**/c/(d|e)/f*.(md|txt)']);
+       });
+     });
+ 
+     describe('commas', function() {
+       it('should work with leading and trailing commas.', function() {
+-        match('a{b,}c', ['a(b|)c']);
+-        match('a{,b}c', ['a(|b)c']);
++        equal('a{b,}c', ['a(b|)c']);
++        equal('a{,b}c', ['a(|b)c']);
+       });
+     });
+ 
+     describe('spaces', function() {
+       it('should handle spaces', function() {
+-        match('0{1..9} {10..20}', ['0([1-9]) (1[0-9]|20)']);
+-        match('a{ ,c{d, },h}x', ['a( |c(d| )|h)x']);
+-        match('a{ ,c{d, },h} ', ['a( |c(d| )|h) ']);
++        equal('0{1..9} {10..20}', ['0([1-9]) (1[0-9]|20)']);
++        equal('a{ ,c{d, },h}x', ['a( |c(d| )|h)x']);
++        equal('a{ ,c{d, },h} ', ['a( |c(d| )|h) ']);
+ 
+-        // see https://github.com/jonschlinkert/micromatch/issues/66
+-        match('/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.{html,ejs}', ['/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.(html|ejs)']);
++        // see https://github.com/jonschlinkert/microequal/issues/66
++        equal('/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.{html,ejs}', ['/Users/tobiasreich/Sites/aaa/bbb/ccc 2016/src/**/[^_]*.(html|ejs)']);
+       });
+     });
+   });
+@@ -153,198 +153,198 @@
+   describe('ranges', function() {
+     describe('escaping / invalid ranges', function() {
+       it('should not try to expand ranges with decimals', function() {
+-        match('{1.1..2.1}', ['{1.1..2.1}']);
+-        match('{1.1..~2.1}', ['{1.1..~2.1}']);
++        equal('{1.1..2.1}', ['{1.1..2.1}']);
++        equal('{1.1..~2.1}', ['{1.1..~2.1}']);
+       });
+ 
+       it('should escape invalid ranges:', function() {
+-        match('{1..0f}', ['{1..0f}']);
+-        match('{1..10..ff}', ['{1..10..ff}']);
+-        match('{1..10.f}', ['{1..10.f}']);
+-        match('{1..10f}', ['{1..10f}']);
+-        match('{1..20..2f}', ['{1..20..2f}']);
+-        match('{1..20..f2}', ['{1..20..f2}']);
+-        match('{1..2f..2}', ['{1..2f..2}']);
+-        match('{1..ff..2}', ['{1..ff..2}']);
+-        match('{1..ff}', ['{1..ff}']);
+-        match('{1..f}', ['([1-f])']);
+-        match('{1.20..2}', ['{1.20..2}']);
++        equal('{1..0f}', ['{1..0f}']);
++        equal('{1..10..ff}', ['{1..10..ff}']);
++        equal('{1..10.f}', ['{1..10.f}']);
++        equal('{1..10f}', ['{1..10f}']);
++        equal('{1..20..2f}', ['{1..20..2f}']);
++        equal('{1..20..f2}', ['{1..20..f2}']);
++        equal('{1..2f..2}', ['{1..2f..2}']);
++        equal('{1..ff..2}', ['{1..ff..2}']);
++        equal('{1..ff}', ['{1..ff}']);
++        equal('{1..f}', ['([1-f])']);
++        equal('{1.20..2}', ['{1.20..2}']);
+       });
+ 
+       it('weirdly-formed brace expansions -- fixed in post-bash-3.1', function() {
+-        match('a-{b{d,e}}-c', ['a-{b(d|e)}-c']);
+-        match('a-{bdef-{g,i}-c', ['a-{bdef-(g|i)-c']);
++        equal('a-{b{d,e}}-c', ['a-{b(d|e)}-c']);
++        equal('a-{bdef-{g,i}-c', ['a-{bdef-(g|i)-c']);
+       });
+ 
+       it('should not expand quoted strings.', function() {
+-        match('{"klklkl"}{1,2,3}', ['{klklkl}(1|2|3)']);
+-        match('{"x,x"}', ['{x,x}']);
++        equal('{"klklkl"}{1,2,3}', ['{klklkl}(1|2|3)']);
++        equal('{"x,x"}', ['{x,x}']);
+       });
+ 
+       it('should escaped outer braces in nested non-sets', function() {
+-        match('{a-{b,c,d}}', ['{a-(b|c|d)}']);
+-        match('{a,{a-{b,c,d}}}', ['(a|{a-(b|c|d)})']);
++        equal('{a-{b,c,d}}', ['{a-(b|c|d)}']);
++        equal('{a,{a-{b,c,d}}}', ['(a|{a-(b|c|d)})']);
+       });
+ 
+       it('should escape imbalanced braces', function() {
+-        match('a-{bdef-{g,i}-c', ['a-{bdef-(g|i)-c']);
+-        match('abc{', ['abc{']);
+-        match('{abc{', ['{abc{']);
+-        match('{abc', ['{abc']);
+-        match('}abc', ['}abc']);
+-        match('ab{c', ['ab{c']);
+-        match('{{a,b}', ['{(a|b)']);
+-        match('{a,b}}', ['(a|b)}']);
+-        match('abcd{efgh', ['abcd{efgh']);
+-        match('a{b{c{d,e}f}g}h', ['a(b(c(d|e)f)g)h']);
+-        match('f{x,y{{g,z}}h}', ['f(x|y((g|z))h)']);
+-        match('z{a,b},c}d', ['z(a|b),c}d']);
+-        match('a{b{c{d,e}f{x,y{{g}h', ['a{b{c(d|e)f{x,y{{g}h']);
+-        match('f{x,y{{g}h', ['f{x,y{{g}h']);
+-        match('f{x,y{{g}}h', ['f{x,y{{g}}h']);
+-        match('a{b{c{d,e}f{x,y{}g}h', ['a{b{c(d|e)f(x|y{}g)h']);
+-        match('f{x,y{}g}h', ['f(x|y{}g)h']);
+-        match('z{a,b{,c}d', ['z{a,b(|c)d']);
++        equal('a-{bdef-{g,i}-c', ['a-{bdef-(g|i)-c']);
++        equal('abc{', ['abc{']);
++        equal('{abc{', ['{abc{']);
++        equal('{abc', ['{abc']);
++        equal('}abc', ['}abc']);
++        equal('ab{c', ['ab{c']);
++        equal('{{a,b}', ['{(a|b)']);
++        equal('{a,b}}', ['(a|b)}']);
++        equal('abcd{efgh', ['abcd{efgh']);
++        equal('a{b{c{d,e}f}g}h', ['a(b(c(d|e)f)g)h']);
++        equal('f{x,y{{g,z}}h}', ['f(x|y((g|z))h)']);
++        equal('z{a,b},c}d', ['z(a|b),c}d']);
++        equal('a{b{c{d,e}f{x,y{{g}h', ['a{b{c(d|e)f{x,y{{g}h']);
++        equal('f{x,y{{g}h', ['f{x,y{{g}h']);
++        equal('f{x,y{{g}}h', ['f{x,y{{g}}h']);
++        equal('a{b{c{d,e}f{x,y{}g}h', ['a{b{c(d|e)f(x|y{}g)h']);
++        equal('f{x,y{}g}h', ['f(x|y{}g)h']);
++        equal('z{a,b{,c}d', ['z{a,b(|c)d']);
+       });
+     });
+ 
+     describe('positive numeric ranges', function() {
+       it('should expand numeric ranges', function() {
+-        match('a{0..3}d', ['a([0-3])d']);
+-        match('x{10..1}y', ['x([1-9]|10)y']);
+-        match('x{3..3}y', ['x3y']);
+-        match('{1..10}', ['([1-9]|10)']);
+-        match('{1..3}', ['([1-3])']);
+-        match('{1..9}', ['([1-9])']);
+-        match('{10..1}', ['([1-9]|10)']);
+-        match('{10..1}y', ['([1-9]|10)y']);
+-        match('{3..3}', ['3']);
+-        match('{5..8}', ['([5-8])']);
++        equal('a{0..3}d', ['a([0-3])d']);
++        equal('x{10..1}y', ['x([1-9]|10)y']);
++        equal('x{3..3}y', ['x3y']);
++        equal('{1..10}', ['([1-9]|10)']);
++        equal('{1..3}', ['([1-3])']);
++        equal('{1..9}', ['([1-9])']);
++        equal('{10..1}', ['([1-9]|10)']);
++        equal('{10..1}y', ['([1-9]|10)y']);
++        equal('{3..3}', ['3']);
++        equal('{5..8}', ['([5-8])']);
+       });
+     });
+ 
+     describe('negative ranges', function() {
+       it('should expand ranges with negative numbers', function() {
+-        match('{-1..-10}', ['(-[1-9]|-10)']);
+-        match('{-10..-1}', ['(-[1-9]|-10)']);
+-        match('{-20..0}', ['(-[1-9]|-1[0-9]|-20|0)']);
+-        match('{0..-5}', ['(-[1-5]|0)']);
+-        match('{9..-4}', ['(-[1-4]|[0-9])']);
++        equal('{-1..-10}', ['(-[1-9]|-10)']);
++        equal('{-10..-1}', ['(-[1-9]|-10)']);
++        equal('{-20..0}', ['(-[1-9]|-1[0-9]|-20|0)']);
++        equal('{0..-5}', ['(-[1-5]|0)']);
++        equal('{9..-4}', ['(-[1-4]|[0-9])']);
+       });
+     });
+ 
+     describe('alphabetical ranges', function() {
+       it('should expand alphabetical ranges', function() {
+-        match('0{1..9}/{10..20}', ['0([1-9])/(1[0-9]|20)']);
+-        match('0{a..d}0', ['0([a-d])0']);
+-        match('a/{b..d}/e', ['a/([b-d])/e']);
+-        match('{1..f}', ['([1-f])']);
+-        match('{a..A}', ['([A-a])']);
+-        match('{A..a}', ['([A-a])']);
+-        match('{a..e}', ['([a-e])']);
+-        match('{A..E}', ['([A-E])']);
+-        match('{a..f}', ['([a-f])']);
+-        match('{a..z}', ['([a-z])']);
+-        match('{E..A}', ['([A-E])']);
+-        match('{f..1}', ['([1-f])']);
+-        match('{f..a}', ['([a-f])']);
+-        match('{f..f}', ['f']);
++        equal('0{1..9}/{10..20}', ['0([1-9])/(1[0-9]|20)']);
++        equal('0{a..d}0', ['0([a-d])0']);
++        equal('a/{b..d}/e', ['a/([b-d])/e']);
++        equal('{1..f}', ['([1-f])']);
++        equal('{a..A}', ['([A-a])']);
++        equal('{A..a}', ['([A-a])']);
++        equal('{a..e}', ['([a-e])']);
++        equal('{A..E}', ['([A-E])']);
++        equal('{a..f}', ['([a-f])']);
++        equal('{a..z}', ['([a-z])']);
++        equal('{E..A}', ['([A-E])']);
++        equal('{f..1}', ['([1-f])']);
++        equal('{f..a}', ['([a-f])']);
++        equal('{f..f}', ['f']);
+       });
+ 
+       it('should expand multiple ranges:', function() {
+-        match('a/{b..d}/e/{f..h}', ['a/([b-d])/e/([f-h])']);
++        equal('a/{b..d}/e/{f..h}', ['a/([b-d])/e/([f-h])']);
+       });
+     });
+ 
+     describe('combo', function() {
+       it('should expand numerical ranges - positive and negative', function() {
+-        match('{-10..10}', ['(-[1-9]|-?10|[0-9])']);
++        equal('{-10..10}', ['(-[1-9]|-?10|[0-9])']);
+       });
+     });
+ 
+     // HEADS UP! If you're using the `--mm` flag minimatch freezes on these
+     describe('large numbers', function() {
+       it('should expand large numbers', function() {
+-        match('{2147483645..2147483649}', ['(214748364[5-9])']);
+-        match('{214748364..2147483649}', ['(21474836[4-9]|2147483[7-9][0-9]|214748[4-9][0-9]{2}|214749[0-9]{3}|2147[5-9][0-9]{4}|214[8-9][0-9]{5}|21[5-9][0-9]{6}|2[2-9][0-9]{7}|[3-9][0-9]{8}|1[0-9]{9}|20[0-9]{8}|21[0-3][0-9]{7}|214[0-6][0-9]{6}|2147[0-3][0-9]{5}|21474[0-7][0-9]{4}|214748[0-2][0-9]{3}|2147483[0-5][0-9]{2}|21474836[0-4][0-9])']);
++        equal('{2147483645..2147483649}', ['(214748364[5-9])']);
++        equal('{214748364..2147483649}', ['(21474836[4-9]|2147483[7-9][0-9]|214748[4-9][0-9]{2}|214749[0-9]{3}|2147[5-9][0-9]{4}|214[89][0-9]{5}|21[5-9][0-9]{6}|2[2-9][0-9]{7}|[3-9][0-9]{8}|1[0-9]{9}|20[0-9]{8}|21[0-3][0-9]{7}|214[0-6][0-9]{6}|2147[0-3][0-9]{5}|21474[0-7][0-9]{4}|214748[0-2][0-9]{3}|2147483[0-5][0-9]{2}|21474836[0-4][0-9])']);
+       });
+     });
+ 
+     describe('steps > positive ranges', function() {
+       it('should expand ranges using steps:', function() {
+-        match('{1..10..1}', ['([1-9]|10)']);
+-        match('{1..10..2}', ['(1|3|5|7|9)']);
+-        match('{1..20..20}', ['1']);
+-        match('{1..20..20}', ['1']);
+-        match('{1..20..20}', ['1']);
+-        match('{1..20..2}', ['(1|3|5|7|9|11|13|15|17|19)']);
+-        match('{10..0..2}', ['(10|8|6|4|2|0)']);
+-        match('{10..1..2}', ['(10|8|6|4|2)']);
+-        match('{100..0..5}', ['(100|95|90|85|80|75|70|65|60|55|50|45|40|35|30|25|20|15|10|5|0)']);
+-        match('{2..10..1}', ['([2-9]|10)']);
+-        match('{2..10..2}', ['(2|4|6|8|10)']);
+-        match('{2..10..3}', ['(2|5|8)']);
+-        match('{a..z..2}', ['(a|c|e|g|i|k|m|o|q|s|u|w|y)']);
++        equal('{1..10..1}', ['([1-9]|10)']);
++        equal('{1..10..2}', ['(1|3|5|7|9)']);
++        equal('{1..20..20}', ['1']);
++        equal('{1..20..20}', ['1']);
++        equal('{1..20..20}', ['1']);
++        equal('{1..20..2}', ['(1|3|5|7|9|11|13|15|17|19)']);
++        equal('{10..0..2}', ['(10|8|6|4|2|0)']);
++        equal('{10..1..2}', ['(10|8|6|4|2)']);
++        equal('{100..0..5}', ['(100|95|90|85|80|75|70|65|60|55|50|45|40|35|30|25|20|15|10|5|0)']);
++        equal('{2..10..1}', ['([2-9]|10)']);
++        equal('{2..10..2}', ['(2|4|6|8|10)']);
++        equal('{2..10..3}', ['(2|5|8)']);
++        equal('{a..z..2}', ['(a|c|e|g|i|k|m|o|q|s|u|w|y)']);
+       });
+ 
+       it('should expand positive ranges with negative steps:', function() {
+-        match('{10..0..-2}', ['(10|8|6|4|2|0)']);
++        equal('{10..0..-2}', ['(10|8|6|4|2|0)']);
+       });
+     });
+ 
+     describe('steps > negative ranges', function() {
+       it('should expand negative ranges using steps:', function() {
+-        match('{-1..-10..-2}', ['(-(1|3|5|7|9))']);
+-        match('{-1..-10..2}', ['(-(1|3|5|7|9))']);
+-        match('{-10..-2..2}', ['(-(10|8|6|4|2))']);
+-        match('{-2..-10..1}', ['(-[2-9]|-10)']);
+-        match('{-2..-10..2}', ['(-(2|4|6|8|10))']);
+-        match('{-2..-10..3}', ['(-(2|5|8))']);
+-        match('{-50..-0..5}', ['(0|-(50|45|40|35|30|25|20|15|10|5))']);
+-        match('{-9..9..3}', ['(0|3|6|9|-(9|6|3))']);
+-        match('{10..1..-2}', ['(10|8|6|4|2)']);
+-        match('{100..0..-5}', ['(100|95|90|85|80|75|70|65|60|55|50|45|40|35|30|25|20|15|10|5|0)']);
++        equal('{-1..-10..-2}', ['(-(1|3|5|7|9))']);
++        equal('{-1..-10..2}', ['(-(1|3|5|7|9))']);
++        equal('{-10..-2..2}', ['(-(10|8|6|4|2))']);
++        equal('{-2..-10..1}', ['(-[2-9]|-10)']);
++        equal('{-2..-10..2}', ['(-(2|4|6|8|10))']);
++        equal('{-2..-10..3}', ['(-(2|5|8))']);
++        equal('{-50..-0..5}', ['(0|-(50|45|40|35|30|25|20|15|10|5))']);
++        equal('{-9..9..3}', ['(0|3|6|9|-(9|6|3))']);
++        equal('{10..1..-2}', ['(10|8|6|4|2)']);
++        equal('{100..0..-5}', ['(100|95|90|85|80|75|70|65|60|55|50|45|40|35|30|25|20|15|10|5|0)']);
+       });
+     });
+ 
+     describe('steps > alphabetical ranges', function() {
+       it('should expand alpha ranges with steps', function() {
+-        match('{a..e..2}', ['(a|c|e)']);
+-        match('{E..A..2}', ['(E|C|A)']);
+-        match('{a..z}', ['([a-z])']);
+-        match('{a..z..2}', ['(a|c|e|g|i|k|m|o|q|s|u|w|y)']);
+-        match('{z..a..-2}', ['(z|x|v|t|r|p|n|l|j|h|f|d|b)']);
++        equal('{a..e..2}', ['(a|c|e)']);
++        equal('{E..A..2}', ['(E|C|A)']);
++        equal('{a..z}', ['([a-z])']);
++        equal('{a..z..2}', ['(a|c|e|g|i|k|m|o|q|s|u|w|y)']);
++        equal('{z..a..-2}', ['(z|x|v|t|r|p|n|l|j|h|f|d|b)']);
+       });
+ 
+       it('should expand alpha ranges with negative steps', function() {
+-        match('{z..a..-2}', ['(z|x|v|t|r|p|n|l|j|h|f|d|b)']);
++        equal('{z..a..-2}', ['(z|x|v|t|r|p|n|l|j|h|f|d|b)']);
+       });
+     });
+ 
+     describe('padding', function() {
+       it('unwanted zero-padding -- fixed post-bash-4.0', function() {
+-        match('{10..0..2}', ['(10|8|6|4|2|0)']);
+-        match('{10..0..-2}', ['(10|8|6|4|2|0)']);
+-        match('{-50..-0..5}', ['(0|-(50|45|40|35|30|25|20|15|10|5))']);
++        equal('{10..0..2}', ['(10|8|6|4|2|0)']);
++        equal('{10..0..-2}', ['(10|8|6|4|2|0)']);
++        equal('{-50..-0..5}', ['(0|-(50|45|40|35|30|25|20|15|10|5))']);
+       });
+     });
+   });
+ 
+   describe('integration', function() {
+     it('should work with dots in file paths', function() {
+-      match('../{1..3}/../foo', ['../([1-3])/../foo']);
+-      match('../{2..10..2}/../foo', ['../(2|4|6|8|10)/../foo']);
+-      match('../{1..3}/../{a,b,c}/foo', ['../([1-3])/../(a|b|c)/foo']);
+-      match('./{a..z..3}/', ['./(a|d|g|j|m|p|s|v|y)/']);
+-      match('./{"x,y"}/{a..z..3}/', ['./{x,y}/(a|d|g|j|m|p|s|v|y)/']);
++      equal('../{1..3}/../foo', ['../([1-3])/../foo']);
++      equal('../{2..10..2}/../foo', ['../(2|4|6|8|10)/../foo']);
++      equal('../{1..3}/../{a,b,c}/foo', ['../([1-3])/../(a|b|c)/foo']);
++      equal('./{a..z..3}/', ['./(a|d|g|j|m|p|s|v|y)/']);
++      equal('./{"x,y"}/{a..z..3}/', ['./{x,y}/(a|d|g|j|m|p|s|v|y)/']);
+     });
+ 
+     it('should expand a complex combination of ranges and sets:', function() {
+-      match('a/{x,y}/{1..5}c{d,e}f.{md,txt}', ['a/(x|y)/([1-5])c(d|e)f.(md|txt)']);
++      equal('a/{x,y}/{1..5}c{d,e}f.{md,txt}', ['a/(x|y)/([1-5])c(d|e)f.(md|txt)']);
+     });
+ 
+     it('should expand complex sets and ranges in `bash` mode:', function() {
+-      match('a/{x,{1..5},y}/c{d}e', ['a/(x|([1-5])|y)/c{d}e']);
++      equal('a/{x,{1..5},y}/c{d}e', ['a/(x|([1-5])|y)/c{d}e']);
+     });
+   });
+ });

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-braces.git



More information about the Pkg-javascript-commits mailing list