mirror of
https://github.com/electron/node-gyp.git
synced 2025-09-16 14:03:39 +02:00
Update bundled node-glob.
This commit is contained in:
parent
a29d3f7d5f
commit
a35dd339c6
28 changed files with 2538 additions and 329 deletions
43
node_modules/glob/test/root.js
generated
vendored
Normal file
43
node_modules/glob/test/root.js
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
var tap = require("tap")
|
||||
|
||||
var origCwd = process.cwd()
|
||||
process.chdir(__dirname)
|
||||
|
||||
tap.test("changing root and searching for /b*/**", function (t) {
|
||||
var glob = require('glob')
|
||||
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