jack e1a2621c78 update 2 years ago
..
00-setup.js e1a2621c78 update 2 years ago
bash-comparison.js e1a2621c78 update 2 years ago
bash-results.json e1a2621c78 update 2 years ago
cwd-test.js e1a2621c78 update 2 years ago
globstar-match.js e1a2621c78 update 2 years ago
mark.js e1a2621c78 update 2 years ago
new-glob-optional-options.js e1a2621c78 update 2 years ago
nocase-nomagic.js e1a2621c78 update 2 years ago
pause-resume.js e1a2621c78 update 2 years ago
readme-issue.js e1a2621c78 update 2 years ago
root-nomount.js e1a2621c78 update 2 years ago
root.js e1a2621c78 update 2 years ago
stat.js e1a2621c78 update 2 years ago
zz-cleanup.js e1a2621c78 update 2 years ago

readme-issue.js

var test = require("tap").test
var glob = require("../")

var mkdirp = require("mkdirp")
var fs = require("fs")
var rimraf = require("rimraf")
var dir = __dirname + "/package"

test("setup", function (t) {
mkdirp.sync(dir)
fs.writeFileSync(dir + "/package.json", "{}", "ascii")
fs.writeFileSync(dir + "/README", "x", "ascii")
t.pass("setup done")
t.end()
})

test("glob", function (t) {
var opt = {
cwd: dir,
nocase: true,
mark: true
}

glob("README?(.*)", opt, function (er, files) {
if (er)
throw er
t.same(files, ["README"])
t.end()
})
})

test("cleanup", function (t) {
rimraf.sync(dir)
t.pass("clean")
t.end()
})