Sha256: 46f065a88b49f3e3b2d8b8c1484d013a4a1252a8b326548c9210f2085e0b47e8

Contents?: true

Size: 843 Bytes

Versions: 23

Compression:

Stored size: 843 Bytes

Contents

/* */ 
(function(process) {
  'use strict';
  var Buffer = require("../../index").Buffer;
  if (process.env.OBJECT_IMPL)
    Buffer.TYPED_ARRAY_SUPPORT = false;
  var common = {};
  var assert = require("assert");
  var zero = [];
  var one = [new Buffer('asdf')];
  var long = [];
  for (var i = 0; i < 10; i++)
    long.push(new Buffer('asdf'));
  var flatZero = Buffer.concat(zero);
  var flatOne = Buffer.concat(one);
  var flatLong = Buffer.concat(long);
  var flatLongLen = Buffer.concat(long, 40);
  assert(flatZero.length === 0);
  assert(flatOne.toString() === 'asdf');
  assert(flatOne !== one[0]);
  assert(flatLong.toString() === (new Array(10 + 1).join('asdf')));
  assert(flatLongLen.toString() === (new Array(10 + 1).join('asdf')));
  assert.throws(function() {
    Buffer.concat([42]);
  }, TypeError);
})(require("process"));

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
sequenceserver-2.0.0 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.rc8 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.rc7 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.rc6 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.rc5 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.rc4 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.rc3 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.rc2 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.rc1 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.beta4 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.beta3 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-2.0.0.beta1 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-1.1.0.beta12 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-1.1.0.beta11 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-1.1.0.beta10 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-1.1.0.beta8 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-1.1.0.beta7 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-1.1.0.beta6 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-1.1.0.beta5 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js
sequenceserver-1.1.0.beta4 public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js