From d024510e8d2e75683f5499cac54271f1bdbfd498 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Wed, 18 Dec 2019 14:42:20 -0500 Subject: tested and fixed processing bugs in space --- tests/space_comb.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/space_comb.js (limited to 'tests/space_comb.js') diff --git a/tests/space_comb.js b/tests/space_comb.js new file mode 100644 index 0000000..3fae916 --- /dev/null +++ b/tests/space_comb.js @@ -0,0 +1,24 @@ +// Tests space.comb() + +space = require('../space'); + +newspace = new space.Space(); +newspace.adhoc('\ +line1\n\ +&&&&transparency&&&&\n\ +\n\ +afterempty\n') + +otherspace = new space.Space(); +otherspace.adhoc('\ +&&&transparency&&&\n\ +testline'); + +function add(char1,char2){ + if (char1 == '') return char2; + else return char1; +} + +otherspace.comb(newspace, add, [0,0]); + +console.log(otherspace.print()); -- cgit