+1
-1
@@ -75,3 +75,3 @@ "use strict"; | ||
| var rem = self.screenOffset % self.cols; | ||
| if (rem !== 0 || self.nullHuman) { | ||
| if (rem !== 0 || (self.totalOffset === 0 && self.nullHuman)) { | ||
| rem = self.cols - rem; | ||
@@ -78,0 +78,0 @@ for (var i=0; i<rem; i++) { |
+1
-1
| { | ||
| "name": "hexer", | ||
| "version": "1.3.2", | ||
| "version": "1.3.3", | ||
| "description": "Hex Dumper (streaming, sync, and cli)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+29
-0
@@ -61,1 +61,30 @@ var test = require('tape'); | ||
| }); | ||
| test('nullHuman works', function t(assert) { | ||
| assert.equal(hex(Buffer(0), { | ||
| nullHuman: 'empty' | ||
| }), '00: empty'); | ||
| assert.end(); | ||
| }); | ||
| test('hex(24 bytes w/ dog & cat + nullHuman option)', function t(assert) { | ||
| assert.equal(hex(Buffer([ | ||
| 0x00, 0x01, | ||
| 0x02, 0x03, | ||
| 0x04, 0x05, | ||
| 0x06, 0x63, | ||
| 0x61, 0x74, | ||
| 0x0a, 0x0b, | ||
| 0x0c, 0x0d, | ||
| 0x0e, 0x0f, | ||
| 0x10, 0x11, | ||
| 0x12, 0x64, | ||
| 0x6f, 0x67, | ||
| 0x16, 0x17, | ||
| ]), { | ||
| nullHuman: 'empty' | ||
| }), | ||
| '00: 0001 0203 0405 0663 6174 0a0b 0c0d 0e0f .......cat......\n' + | ||
| '10: 1011 1264 6f67 1617 ...dog..'); | ||
| assert.end(); | ||
| }); |
18841
4.29%338
8.68%