'use strict';

var fs = require('fs');
var assert = require('assert');
var innersource = require('../index');

function test1() {
  console.log('hello');
}

assert.equal(innersource(test1).trim(), "console.log('hello');");

var test2 = function () {
  console.log('hello');
};

assert.equal(innersource(test2).trim(), "console.log('hello');");

var test3 = function test() {
  console.log('hello');
};

assert.equal(innersource(test3).trim(), "console.log('hello');");

function   test4() {
  console.log('hello');
}

assert.equal(innersource(test4).trim(), "console.log('hello');");

function test5() {}

assert.equal(innersource(test5).trim(), "");

function test6() {
}

assert.equal(innersource(test6).trim(), "");

@@ -700,20 +700,174 @@
 test6).trim(), %22%22);%0A
+%0Afunction test7() %7B%0A  if (true) %7B%0A    console.log('abc');%0A  %7D%0A%7D%0A%0Aassert.equal(innersource(test7).trim(), %22if (true) %7B%5Cn    console.log(%5C'abc%5C');%5Cn  %7D%22);%0A%0A

Add explicit nested curly test