// Tests space.comb() const Space = require('../space'); newspace = new Space(); newspace.adhoc('\ line1\n\ &&&&transparency&&&&\n\ \n\ afterempty\n') empty = new Space(); otherspace = new Space(); otherspace.adhoc('\ &&&transparency&&&\n\ testline'); function add(char1,char2){ if (char1 == '') return char2; else return char1; } otherspace.loc = [0,0]; newspace.loc = [0,0]; otherspace.comb(newspace, add); empty.comb(otherspace, add); otherspace.loc = [8,0]; empty.comb(otherspace, add); newspace.loc = [0, -32]; empty.comb(newspace, add); console.log(otherspace.print()); console.log('--------'); console.log(empty.print()); // Should be equal to otherspace slightly displaced