blob: 27627094f304ef75b82e364e932af18d0f314835 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
exports.test = function(libUncrustify, assert){
var uncrustify = libUncrustify();
var input = ' string a = "aaaa";';
var expectedOutput = 'string a = "aaaa";';
var generatedOutput = uncrustify.uncrustify( input, uncrustify.Language.CPP );
assert.deepEqual(expectedOutput, generatedOutput, "comparing expectedOutput and generatedOutput");
uncrustify.destruct();
};
if (module == require.main) {
if(process.argv.length < 3) {throw "libUncrustify.js path missing";}
var uncrustify = require(process.argv[2]);
var assert = require("assert");
exports.test(uncrustify, assert);
}
|