Sha256: 33aa16a73f86f77de3127fa49a4ce74b1f783a6835b6416223bc4a430ce4c47a

Contents?: true

Size: 1.7 KB

Versions: 49

Compression:

Stored size: 1.7 KB

Contents

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
    var expect = [ 'a/abcdef/',
                   'a/abcfed/',
                   'a/b/',
                   'a/bc/',
                   'a/c/',
                   'a/cb/' ]

    if (process.platform !== "win32")
      expect.push('a/symlink/')

    t.same(results, expect)
    t.end()
  })
})

test("mark=false, no / on pattern", function (t) {
  glob("a/*", function (er, results) {
    if (er)
      throw er
    var expect = [ 'a/abcdef',
                   'a/abcfed',
                   'a/b',
                   'a/bc',
                   'a/c',
                   'a/cb' ]

    if (process.platform !== "win32")
      expect.push('a/symlink')
    t.same(results, expect)
    t.end()
  })
})

test("mark=true, / on pattern", function (t) {
  glob("a/*/", {mark: true}, function (er, results) {
    if (er)
      throw er
    var expect = [ 'a/abcdef/',
                    'a/abcfed/',
                    'a/b/',
                    'a/bc/',
                    'a/c/',
                    'a/cb/' ]
    if (process.platform !== "win32")
      expect.push('a/symlink/')
    t.same(results, expect)
    t.end()
  })
})

test("mark=false, / on pattern", function (t) {
  glob("a/*/", function (er, results) {
    if (er)
      throw er
    var expect = [ 'a/abcdef/',
                   'a/abcfed/',
                   'a/b/',
                   'a/bc/',
                   'a/c/',
                   'a/cb/' ]
    if (process.platform !== "win32")
      expect.push('a/symlink/')
    t.same(results, expect)
    t.end()
  })
})

Version data entries

49 entries across 43 versions & 6 rubygems

Version Path
stylus-source-0.36.0 vendor/node_modules/mocha/node_modules/glob/test/mark.js
stylus-source-0.35.1 vendor/node_modules/mocha/node_modules/glob/test/mark.js
stylus-source-0.35.0 vendor/node_modules/mocha/node_modules/glob/test/mark.js
stylus-source-0.34.1 vendor/node_modules/mocha/node_modules/glob/test/mark.js
stylus-source-0.34.0 vendor/node_modules/mocha/node_modules/glob/test/mark.js
stylus-source-0.33.1 vendor/node_modules/mocha/node_modules/glob/test/mark.js
stylus-source-0.33.0 vendor/node_modules/mocha/node_modules/glob/test/mark.js
stylus-source-0.32.1 vendor/node_modules/mocha/node_modules/glob/test/mark.js
stylus-source-0.32.0 vendor/node_modules/mocha/node_modules/glob/test/mark.js