Files: a8a2cd81df327abe9ebd5c8e8d80b504bb79119d / test / index-pack.js
677 bytesRaw
1 | var tape = require('tape') |
2 | var indexPack = require('../lib/index-pack') |
3 | var pull = require('pull-stream') |
4 | var toPull = require('stream-to-pull-stream') |
5 | var cp = require('child_process') |
6 | |
7 | tape('index-pack produces output', function (t) { |
8 | var child = cp.spawn('git', ['pack-objects', '--stdout', '--revs']) |
9 | child.stdin.end('HEAD\n') |
10 | indexPack(toPull.source(child.stdout), function (err, idx) { |
11 | t.error(err, 'index pack') |
12 | pull(idx, pull.reduce(function (val, buf) { |
13 | return val + buf.length |
14 | }, 0, function (err, length) { |
15 | t.error(err, 'read index pack') |
16 | t.comment('len: ' + length) |
17 | t.ok(length > 0, 'length') |
18 | t.end() |
19 | })) |
20 | }) |
21 | }) |
22 |
Built with git-ssb-web