Sha256: a44c271cd743b6afaa5ce20703454ae27f2d694c2af1e2a5ba29da51a3898113

Contents?: true

Size: 1.23 KB

Versions: 22

Compression:

Stored size: 1.23 KB

Contents

// Set the umask, so that it works the same everywhere.
process.umask(parseInt('22', 8))

var tap = require("tap")
  , tar = require("../tar.js")
  , fs = require("fs")
  , path = require("path")
  , file = path.resolve(__dirname, "link-file-entry-collision/bad-link.tar")
  , target = path.resolve(__dirname, "tmp/link-file-entry-collision")
  , index = 0
  , fstream = require("fstream")
  , mkdirp = require("mkdirp")
  , rimraf = require("rimraf")

tap.test("preclean", function (t) {
  rimraf.sync(target)
  t.pass("cleaned!")
  t.end()
})

tap.test("extract test", function (t) {
  var extract = tar.Extract(target)
  var inp = fs.createReadStream(file)
  inp.pipe(extract)

  extract.on("end", function () {
    t.equal(fs.readFileSync(target + "/bad-link-target", "utf8"),
      "this should remain the same\n")
    t.equal(fs.readFileSync(target + "/a.txt", "utf8"),
      "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    t.end()
  })
})

tap.test("cleanup", function (t) {
  rimraf.sync(target)
  t.pass("cleaned!")
  t.end()
})

Version data entries

22 entries across 21 versions & 9 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/tar/test/link-file-entry-collision.js
disco_app-0.18.0 test/dummy/node_modules/tar/test/link-file-entry-collision.js
disco_app-0.18.2 test/dummy/node_modules/tar/test/link-file-entry-collision.js
tang-0.2.1 spec/tang_app/node_modules/node-gyp/node_modules/tar/test/link-file-entry-collision.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/node-gyp/node_modules/tar/test/link-file-entry-collision.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/tar/test/link-file-entry-collision.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/node-gyp/node_modules/tar/test/link-file-entry-collision.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/node-gyp/node_modules/tar/test/link-file-entry-collision.js
tang-0.2.0 spec/tang_app/node_modules/node-gyp/node_modules/tar/test/link-file-entry-collision.js
tang-0.1.0 spec/tang_app/node_modules/node-gyp/node_modules/tar/test/link-file-entry-collision.js
tang-0.0.9 spec/tang_app/node_modules/node-gyp/node_modules/tar/test/link-file-entry-collision.js
enju_library-0.3.8 spec/dummy/node_modules/tar/test/link-file-entry-collision.js
ilog-0.4.1 node_modules/tar/test/link-file-entry-collision.js
ilog-0.4.0 node_modules/tar/test/link-file-entry-collision.js
ilog-0.3.3 node_modules/tar/test/link-file-entry-collision.js
jester-data-8.0.0 node_modules/tar/test/link-file-entry-collision.js
ezii-os-5.2.1 node_modules/tar/test/link-file-entry-collision.js
ezii-os-2.0.1 node_modules/tar/test/link-file-entry-collision.js
ezii-os-1.1.0 node_modules/tar/test/link-file-entry-collision.js
ezii-os-1.0.0 node_modules/tar/test/link-file-entry-collision.js