mirror of
https://github.com/electron/node-gyp.git
synced 2025-09-16 14:03:39 +02:00
update the bundled node-glob to v3.1.12
This commit is contained in:
parent
0ab89440a2
commit
a8a6099ce1
10 changed files with 41 additions and 464 deletions
43
node_modules/glob/test/root.js
generated
vendored
43
node_modules/glob/test/root.js
generated
vendored
|
@ -1,43 +0,0 @@
|
|||
var tap = require("tap")
|
||||
|
||||
var origCwd = process.cwd()
|
||||
process.chdir(__dirname)
|
||||
|
||||
tap.test("changing root and searching for /b*/**", function (t) {
|
||||
var glob = require('../')
|
||||
var path = require('path')
|
||||
t.test('.', function (t) {
|
||||
glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
|
||||
t.ifError(er)
|
||||
t.like(matches, [])
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
t.test('a', function (t) {
|
||||
glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
|
||||
t.ifError(er)
|
||||
t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
|
||||
return path.join(path.resolve('a'), m)
|
||||
}))
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
t.test('root=a, cwd=a/b', function (t) {
|
||||
glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
|
||||
t.ifError(er)
|
||||
t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
|
||||
return path.join(path.resolve('a'), m)
|
||||
}))
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
t.test('cd -', function (t) {
|
||||
process.chdir(origCwd)
|
||||
t.end()
|
||||
})
|
||||
|
||||
t.end()
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue