Code coverage report for lib/parser/commands/uniq.js

Statements: 100% (33 / 33)      Branches: 75% (3 / 4)      Functions: 100% (5 / 5)      Lines: 100% (30 / 30)      Ignored: none     

All files » lib/parser/commands/ » uniq.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 811 1 1 1 1   1 1 1 1                                           1                                 1       1   1   1   1 1 1 4 4   1   1   1 1 1 1 1       1 1 1 1  
var __extends = this.__extends || function (d, b) {
    for (var p in b) Eif (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var $ = require("../utils/optionsParser");
var parserModule = require("../utils/parserData");
var common = require("../utils/init");
var GraphModule = require("../../common/graph");
 
/*
-c, --count
-d, --repeated
only print duplicate lines
-D, --all-repeated[=delimit-method]
print  all  duplicate  lines  delimit-method={none(default),prepend,separate}
Delimiting is done with blank lines
-f, --skip-fields=N
avoid comparing the first N fields
-i, --ignore-case
ignore differences in case when comparing
-s, --skip-chars=N
avoid comparing the first N characters
-u, --unique
only print unique lines
-z, --zero-terminated
end lines with 0 byte, not newline
-w, --check-chars=N
compare no more than N characters in lines
*/
var flags = {
    count: {
        name: "count",
        option: 'c',
        longOption: 'count',
        description: "prefix lines by the number of occurrences",
        active: false
    },
    ignoreCase: {
        name: "ignore case",
        option: 'd',
        longOption: 'delete',
        description: "delete characters in SET1, do not translate",
        active: false
    }
};
 
var config = {
    flags: flags
};
 
var uniqData = new parserModule.ParserData(config);
 
var optionsParser = $.optionParserFromConfig(config);
 
var shortOptions = optionsParser.shortOptions;
 
var UniqComponent = (function (_super) {
    __extends(UniqComponent, _super);
    function UniqComponent() {
        _super.apply(this, arguments);
        this.exec = "uniq";
    }
    return UniqComponent;
})(GraphModule.CommandComponent);
exports.UniqComponent = UniqComponent;
 
function defaultComponentData() {
    var component = new UniqComponent();
    component.selectors = uniqData.componentSelectors;
    component.flags = uniqData.componentFlags;
    return component;
}
;
 
exports.parseCommand = common.commonParseCommand(optionsParser, defaultComponentData);
exports.parseComponent = common.commonParseComponent(uniqData.flagOptions, uniqData.selectorOptions, uniqData.parameterOptions);
exports.VisualSelectorOptions = uniqData.visualSelectorOptions;
exports.componentClass = UniqComponent;