var buster = require("buster");
var assert = buster.assert;
var a = require("../../lib/buster-terminal").align;

buster.testCase("Terminal string align test", {
    "max width": {
        "should get width of array of strings": function () {
            assert.equals(a.maxWidth(["a", "b", "hey", "there"]), 5);
        },

        "should get width of array of strings and numbers": function () {
            assert.equals(a.maxWidth(["a", 666782, 2, "there"]), 6);
        },

        "should count width of undefined as 0": function () {
            assert.equals(a.maxWidth([null, undefined, false, ""]), 5);
        }
    },

    "alignment": {
        "should left align text": function () {
            assert.equals(a.alignLeft("Hey there", 13), "Hey there    ");
        },

        "should right align text": function () {
            assert.equals(a.alignRight("Hey there", 13), "    Hey there");
        }
    }
});

@@ -897,24 +897,160 @@
 ey there%22);%0A
+        %7D,%0A%0A        %22should not pad too long text%22: function () %7B%0A            assert.equals(a.alignRight(%22Hey there%22, 4), %22Hey there%22);%0A
         %7D%0A  

Add test for aligning too long strings