Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80724 views
1
var tap = require("tap")
2
, minimatch = require("../")
3
4
tap.test("brace expansion", function (t) {
5
// [ pattern, [expanded] ]
6
; [ [ "a{b,c{d,e},{f,g}h}x{y,z}"
7
, [ "abxy"
8
, "abxz"
9
, "acdxy"
10
, "acdxz"
11
, "acexy"
12
, "acexz"
13
, "afhxy"
14
, "afhxz"
15
, "aghxy"
16
, "aghxz" ] ]
17
, [ "a{1..5}b"
18
, [ "a1b"
19
, "a2b"
20
, "a3b"
21
, "a4b"
22
, "a5b" ] ]
23
, [ "a{b}c", ["a{b}c"] ]
24
, [ "a{00..05}b"
25
, ["a00b"
26
,"a01b"
27
,"a02b"
28
,"a03b"
29
,"a04b"
30
,"a05b" ] ]
31
].forEach(function (tc) {
32
var p = tc[0]
33
, expect = tc[1]
34
t.equivalent(minimatch.braceExpand(p), expect, p)
35
})
36
console.error("ending")
37
t.end()
38
})
39
40
41
42