You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
1.5 KiB

var test = require("tap").test
var glob = require('../')
process.chdir(__dirname)
test("mark, no / on pattern", function (t) {
glob("a/*", {mark: true}, function (er, results) {
if (er)
throw er
t.same(results, [ 'a/abcdef/',
'a/abcfed/',
'a/b/',
'a/bc/',
'a/c/',
'a/cb/',
'a/symlink/' ])
t.end()
})
})
test("mark=false, no / on pattern", function (t) {
glob("a/*", function (er, results) {
if (er)
throw er
t.same(results, [ 'a/abcdef',
'a/abcfed',
'a/b',
'a/bc',
'a/c',
'a/cb',
'a/symlink' ])
t.end()
})
})
test("mark=true, / on pattern", function (t) {
glob("a/*/", {mark: true}, function (er, results) {
if (er)
throw er
t.same(results, [ 'a/abcdef/',
'a/abcfed/',
'a/b/',
'a/bc/',
'a/c/',
'a/cb/',
'a/symlink/' ])
t.end()
})
})
test("mark=false, / on pattern", function (t) {
glob("a/*/", function (er, results) {
if (er)
throw er
t.same(results, [ 'a/abcdef/',
'a/abcfed/',
'a/b/',
'a/bc/',
'a/c/',
'a/cb/',
'a/symlink/' ])
t.end()
})
})