1 var test = require('tape');
2 var expand = require('..');
4 test('numeric sequences', function(t) {
5 t.deepEqual(expand('a{1..2}b{2..3}c'), [
6 'a1b2c', 'a1b3c', 'a2b2c', 'a2b3c'
8 t.deepEqual(expand('{1..2}{2..3}'), [
14 test('numeric sequences with step count', function(t) {
15 t.deepEqual(expand('{0..8..2}'), [
16 '0', '2', '4', '6', '8'
18 t.deepEqual(expand('{1..8..2}'), [
24 test('numeric sequence with negative x / y', function(t) {
25 t.deepEqual(expand('{3..-2}'), [
26 '3', '2', '1', '0', '-1', '-2'
31 test('alphabetic sequences', function(t) {
32 t.deepEqual(expand('1{a..b}2{b..c}3'), [
33 '1a2b3', '1a2c3', '1b2b3', '1b2c3'
35 t.deepEqual(expand('{a..b}{b..c}'), [
36 'ab', 'ac', 'bb', 'bc'
41 test('alphabetic sequences with step count', function(t) {
42 t.deepEqual(expand('{a..k..2}'), [
43 'a', 'c', 'e', 'g', 'i', 'k'
45 t.deepEqual(expand('{b..k..2}'), [
46 'b', 'd', 'f', 'h', 'j'