#!/usr/bin/env node

require('./proof')(1, function (step, Strata, deepEqual, tmp, insert, load, objectify, equal, serialize) {
    function forward (name) { return function () { return fs[name].apply(fs, arguments) } }

    var fs = require('fs'), path = require('path'), proxy = {}
    for (var x in fs) {
        if (x[0] != '_') proxy[x] = forward(x)
    }
    proxy.unlink = function (file, callback) {
        var error = new Error()
        error.code = 'EACCES'
        callback(error)
    }
    var strata = new Strata({ directory: tmp, fs: proxy, leafSize: 3 })

    step(function () {
        serialize(__dirname + '/../basics/fixtures/split.before.json', tmp, step())
    }, function () {
        strata.open(step())
    }, function () {
        insert(step, strata, [ 'b' ])
    }, [function () {
        strata.balance(step())
    }, function (_, error) {
        equal(error.code, 'EACCES', 'unlink error')
    }])
})

@@ -63,19 +63,8 @@
 ata,
- deepEqual,
  tmp
@@ -77,41 +77,35 @@
 rt, 
-load, objectify, equal, serialize
+serialize, deepEqual, equal
 ) %7B%0A
@@ -133,16 +133,24 @@
 (name) %7B
+%0A       
  return 
@@ -205,12 +205,15 @@
 s) %7D
+%0A   
  %7D%0A
-%0A
     
@@ -559,17 +559,16 @@
 e: 3 %7D)%0A
-%0A
     step

Tidy `t/coverage/replace.t.js`.