示例#1
0
 tenon(opts, function(err, res) {
   if (err) {
     grunt.log.error(chalk.red.bgWhite('Tenon error:') + ' ' + err.slice(0,500));
     callback(err);
     return;
   }
   grunt.log.write('\n' + fmtFilename(file) + ' ');
   if (res.resultSetFiltered.length > 0) {
     failed += 1;
     grunt.log.writeln('');
     res.resultSetFiltered.forEach(function(itm) {
       grunt.log.error(' tID:   ' + itm.tID);
       grunt.log.writeln('   bpID:  ' + itm.bpID);
       grunt.log.writeln('   Title: ' + itm.errorTitle);
       grunt.log.writeln('   Xpath: ' + itm.xpath);
       if (snippet) {
         grunt.log.writeln('   Snippit:');
         grunt.log.writeln(chalk.gray(itm.errorSnippet.replace(/&lt;/g, '<').replace(/&gt;/g, '>')));
       }
     });
   } else {
     grunt.log.ok(chalk.green('OK'));
   }
   if (writePath) {
     delete res.resultSetFiltered;
     allOut[file] = res;
   }
   callback();
 });
  }, function (err, airlines) {
    if (err) {
      console.log(chalk.red.bgWhite("\ngetAllDestinations found an error %s"), err); // eslint-disable-line no-console
    }
    airlines.destinationsSaved = destinationsSaved;
    airlines.errors = errors;
    debug("You got %s destinations and %s errors", destinationsSaved, errors);
    callback(err, airlines);

  });
示例#3
0
    it('should wrap ansi styling to the next line properly', function (done) {
      var testName = 'wrap-ansi-styles';
      var expected = yosay(chalk.red.bgWhite('Hi') + ' there, sir! ' + chalk.bgBlue.white('you are looking') + ' swell today!');

      fs.readFile(getFixturePath(testName), function (err, data) {
        assert.ifError(err);
        assert.equal(JSON.parse(data), expected);
        done();
      });
    });
示例#4
0
    it('should handle part ansi and part not-ansi', function (done) {
      var testName = 'half-ansi';
      var expected = yosay(chalk.red.bgWhite('Hi') + ' there, sir!');

      fs.readFile(getFixturePath(testName), function (err, data) {
        assert.ifError(err);
        assert.equal(JSON.parse(data), expected);
        done();
      });
    });
示例#5
0
    it('should display ansi styling correctly', function (done) {
      var testName = 'ansi';
      var expected = yosay(chalk.red.bgWhite('Hi'));

      fs.readFile(getFixturePath(testName), function (err, data) {
        assert.ifError(err);
        assert.equal(JSON.parse(data), expected);
        done();
      });
    });
示例#6
0
Host.prototype.getContainersByType = function(clazz, strict) {
    var results = [];
    for (var i = 0, l = this.containers.length; i < l; i++) {
        var C = this.containers[i];
        //        console.log(c.green.bgBlack(C.constructor.type, clazz.type));
        if (strict === true && this.containers[i].constructor.type === clazz.type) {
            results.push(this.containers[i]);

        } else if (this.containers[i] instanceof clazz) {
            results.push(this.containers[i]);
        }
        //        console.log(c.yellow.bgBlack(typeof clazz, clazz.type));
    }
    console.log(c.red.bgWhite('Seraching for contatiners of type', clazz.type, 'on node', this.ip, 'results', results.length, this.containers.length, 'containers len'));
    return results;
}
示例#7
0
 var H = function(s) {
     s = s.toString('utf8');
     console.log(c.red.bgWhite(s));
 };
示例#8
0
文件: test.js 项目: yeoman/yosay
    it('should wrap ansi styling to the next line properly', done => {
      const testName = 'wrap-ansi-styles';
      const expected = yosay(chalk.red.bgWhite('Hi') + ' there, sir! ' + chalk.bgBlue.white('you are looking') + ' swell today!');

      getAssertResult(testName, expected, done);
    });
示例#9
0
 mbufferRecv.stderr.on('data', function(data) {
     console.log(c.red.bgWhite(data.toString("utf8")));
 });
示例#10
0
文件: test.js 项目: yeoman/yosay
    it('should handle part ansi and part not-ansi', done => {
      const testName = 'half-ansi';
      const expected = yosay(chalk.red.bgWhite('Hi') + ' there, sir!');

      getAssertResult(testName, expected, done);
    });
示例#11
0
文件: test.js 项目: yeoman/yosay
    it('should display ansi styling correctly', done => {
      const testName = 'ansi';
      const expected = yosay(chalk.red.bgWhite('Hi'));

      getAssertResult(testName, expected, done);
    });
示例#12
0
文件: test.js 项目: 5y/yosay
 it('should wrap ansi styling to the next line properly', function () {
   var expected = '\n     _-----_\n    |       |    .--------------------------.\n    |\u001b[31m--(o)--\u001b[39m|    \u001b[0m|\u001b[0m  \u001b[0m\u001b[47m\u001b[31mH\u001b[47m\u001b[31mi\u001b[39m\u001b[49m \u001b[39m\u001b[49mt\u001b[39m\u001b[49mh\u001b[39m\u001b[49me\u001b[39m\u001b[49mr\u001b[39m\u001b[49me\u001b[39m\u001b[49m,\u001b[39m\u001b[49m \u001b[39m\u001b[49ms\u001b[39m\u001b[49mi\u001b[39m\u001b[49mr\u001b[39m\u001b[49m!\u001b[39m\u001b[49m \u001b[37m\u001b[44my\u001b[37m\u001b[44mo\u001b[37m\u001b[44mu\u001b[37m\u001b[44m \u001b[37m\u001b[44ma\u001b[37m\u001b[44mr\u001b[37m\u001b[44me\u001b[0m  \u001b[0m|\u001b[0m\n   `---------´   \u001b[0m|\u001b[0m   \u001b[0m\u001b[37m\u001b[44ml\u001b[37m\u001b[44mo\u001b[37m\u001b[44mo\u001b[37m\u001b[44mk\u001b[37m\u001b[44mi\u001b[37m\u001b[44mn\u001b[37m\u001b[44mg\u001b[49m\u001b[39m \u001b[49m\u001b[39ms\u001b[49m\u001b[39mw\u001b[49m\u001b[39me\u001b[49m\u001b[39ml\u001b[49m\u001b[39ml\u001b[49m\u001b[39m \u001b[49m\u001b[39mt\u001b[49m\u001b[39mo\u001b[49m\u001b[39md\u001b[49m\u001b[39ma\u001b[49m\u001b[39my\u001b[49m\u001b[39m!\u001b[0m   \u001b[0m|\u001b[0m\n    \u001b[33m(\u001b[39m _\u001b[33m´U`\u001b[39m_ \u001b[33m)\u001b[39m    \u001b[0m\'--------------------------\'\n    /___A___\\    \n     \u001b[33m|  ~  |\u001b[39m     \n   __\u001b[33m\'.___.\'\u001b[39m__   \n ´   \u001b[31m`  |\u001b[39m° \u001b[31m´ Y\u001b[39m ` \n';
   assert.equal(yosay(chalk.red.bgWhite('Hi') + ' there, sir! ' + chalk.bgBlue.white('you are looking') + ' swell today!'), expected);
 });
示例#13
0
文件: test.js 项目: 5y/yosay
 it('should handle part ansi and part not-ansi', function () {
   var expected = '\n     _-----_\n    |       |    .--------------------------.\n    |\u001b[31m--(o)--\u001b[39m|    \u001b[0m|\u001b[0m      \u001b[0m\u001b[47m\u001b[31mH\u001b[47m\u001b[31mi\u001b[39m\u001b[49m \u001b[39m\u001b[49mt\u001b[39m\u001b[49mh\u001b[39m\u001b[49me\u001b[39m\u001b[49mr\u001b[39m\u001b[49me\u001b[39m\u001b[49m,\u001b[39m\u001b[49m \u001b[39m\u001b[49ms\u001b[39m\u001b[49mi\u001b[39m\u001b[49mr\u001b[39m\u001b[49m!\u001b[0m      \u001b[0m|\u001b[0m\n   `---------´   \u001b[0m\'--------------------------\'\n    \u001b[33m(\u001b[39m _\u001b[33m´U`\u001b[39m_ \u001b[33m)\u001b[39m    \n    /___A___\\    \n     \u001b[33m|  ~  |\u001b[39m     \n   __\u001b[33m\'.___.\'\u001b[39m__   \n ´   \u001b[31m`  |\u001b[39m° \u001b[31m´ Y\u001b[39m ` \n';
   assert.equal(yosay(chalk.red.bgWhite('Hi') + ' there, sir!'), expected);
 });
示例#14
0
文件: test.js 项目: 5y/yosay
 it('should display ansi styling correctly', function () {
   var expected = '\n     _-----_\n    |       |    .--------------------------.\n    |\u001b[31m--(o)--\u001b[39m|    \u001b[0m|\u001b[0m            \u001b[0m\u001b[47m\u001b[31mH\u001b[47m\u001b[31mi\u001b[0m            \u001b[0m|\u001b[0m\n   `---------´   \u001b[0m\'--------------------------\'\n    \u001b[33m(\u001b[39m _\u001b[33m´U`\u001b[39m_ \u001b[33m)\u001b[39m    \n    /___A___\\    \n     \u001b[33m|  ~  |\u001b[39m     \n   __\u001b[33m\'.___.\'\u001b[39m__   \n ´   \u001b[31m`  |\u001b[39m° \u001b[31m´ Y\u001b[39m ` \n';
   assert.equal(yosay(chalk.red.bgWhite('Hi')), expected);
 });