neo-blessed/test/tput.js

31 lines
899 B
JavaScript
Raw Normal View History

2013-02-24 13:53:18 +00:00
var Tput = require('../').Tput;
2013-02-15 17:42:52 +00:00
2013-02-24 13:53:18 +00:00
var tput = Tput({
term: process.argv[2] || 'xterm',
extended: true,
2013-02-24 13:53:18 +00:00
debug: true
});
2013-02-15 17:42:52 +00:00
2013-02-24 14:04:07 +00:00
console.log('Max colors: %d.', tput.max_colors);
2013-02-16 23:54:20 +00:00
2013-02-24 17:51:14 +00:00
//process.stdout.write(Tput.sprintf('%-10s\n', 'hello'));
2013-02-20 00:35:26 +00:00
//console.log(tput.info);
//tput.compile();
2013-02-18 20:43:53 +00:00
2013-02-17 19:25:58 +00:00
//tput._compile('%?%p9%t\u001b(0%e\u001b(B%;\u001b[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m');
2013-02-18 20:43:53 +00:00
2013-02-24 13:43:19 +00:00
//console.log(tput.methods.set_foreground([4]) + 'foo' + tput.methods.set_attributes([0]));
//console.log(tput.set_foreground(4) + 'foo' + tput.set_attributes(0));
2013-02-24 16:59:20 +00:00
//console.log(tput.setaf(4) + 'foo' + tput.sgr0());
//console.log(tput.setaf(4) + 'foo' + tput.sgr(0));
2013-02-22 21:51:13 +00:00
2013-02-22 22:12:34 +00:00
//tput.readTermcap();
2013-02-22 21:51:13 +00:00
//console.log(tput.termcap.terms);
2013-02-24 14:13:25 +00:00
//tput.padding = true;
//tput._parsePadding('hello$<1000/>world', console.log, function() {
// tput._parsePadding('$<1000*>foo$<1000/>bar', console.log, process.exit);
//});