From 9e0df1a6ae9eab50893c96897d6f254d203902df Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 7 May 2015 22:18:05 -0700 Subject: [PATCH] layout test. --- test/widget-layout.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/test/widget-layout.js b/test/widget-layout.js index e3888dc..7b2e817 100644 --- a/test/widget-layout.js +++ b/test/widget-layout.js @@ -143,17 +143,19 @@ var box12 = blessed.box({ content: '12' }); -/* -for (var i = 0; i < 10; i++) { - blessed.box({ - parent: layout, - width: i % 2 === 0 ? 10 : 20, - height: i % 2 === 0 ? 5 : 10, - border: 'line', - content: (i + 1) + '' - }); +if (process.argv[2] !== 'grid') { + for (var i = 0; i < 10; i++) { + blessed.box({ + parent: layout, + // width: i % 2 === 0 ? 10 : 20, + // height: i % 2 === 0 ? 5 : 10, + width: Math.random() > 0.5 ? 10 : 20, + height: Math.random() > 0.5 ? 5 : 10, + border: 'line', + content: (i + 1 + 12) + '' + }); + } } -*/ screen.key('q', function() { return process.exit(0);