diff --git a/tests/checks.test.js b/tests/checks.test.js index b218ce6..32dcf62 100644 --- a/tests/checks.test.js +++ b/tests/checks.test.js @@ -45,16 +45,19 @@ Número PI con 6 decimales: 3.141593 18 dec = 12 hex = 22 oct = 10010 bin 19 dec = 13 hex = 23 oct = 10011 bin 20 dec = 14 hex = 24 oct = 10100 bin +21 dec = 15 hex = 25 oct = 10101 bin +22 dec = 16 hex = 26 oct = 10110 bin 1 dec = 1 hex = 1 oct = 1 bin 3 dec = 3 hex = 3 oct = 11 bin 5 dec = 5 hex = 5 oct = 101 bin 7 dec = 7 hex = 7 oct = 111 bin 9 dec = 9 hex = 11 oct = 1001 bin +21 dec = 15 hex = 25 oct = 10101 bin -Hola in chino se escribe así: 嗨,你好吗 +Hi in Chinese is written as:嗨, 你好吗. -The programa ha acabado de ejecutar: Tue Sep 04 2018 11:07:56 GMT+0200 (Romance Daylight Time) +The program has finished `; const EXPECTED_OUTPUT_LENGTH = EXPECTED.split(/\r?\n\r?\n/).length; @@ -87,13 +90,13 @@ describe("mooc_node-mod1_types_sentences", function () { this.msg_err = `Error running the file.\n\t\t\tReceived: ${error_exe}`; error_critical = this.msg_err; } else { - output = output.split('', async function () { this.name = /\r?\n\r?\n/); + output = output.split(/\r?\n\r?\n/); } should.not.exist(error_exe); } }); - it(`3: Checking the output length`; + it('', async function () { this.name = `3: Checking the output length`; this.score = 1.5; if (error_critical) { this.msg_err = error_critical; @@ -150,7 +153,7 @@ describe("mooc_node-mod1_types_sentences", function () { this.error = false; this.lines = output[2].split(/\r?\n/); for (let d in this.lines) { - this.myreg = `.+?${d}.+?${(d >>> 0).toString(16)}.+?${(d >>> 0).toString(8)}.+?${(d >>> 0).toString(2)}.+?`; + this.myreg = `${d}.+?${(d >>> 0).toString(16)}.+?${(d >>> 0).toString(8)}.+?${(d >>> 0).toString(2)}.+?`; this.expected = new RegExp(this.myreg); let ok = Utils.search(this.expected, this.lines[d]); if (!ok) { @@ -172,9 +175,9 @@ describe("mooc_node-mod1_types_sentences", function () { this.error = false; this.lines = output[3].split(/\r?\n/); let i = 0; - for (let d = 0; d <= 22; ++d) { + for (let d = 1; d <= 21; ++d) { if (((d % 2) === 1) && ((d < 10) || (d > 20))) { - this.myreg = `.+?${d}.+?${(d >>> 0).toString(16)}.+?${(d >>> 0).toString(8)}.+?${(d >>> 0).toString(2)}.+?`; + this.myreg = `${d}.+?${(d >>> 0).toString(16)}.+?${(d >>> 0).toString(8)}.+?${(d >>> 0).toString(2)}.+?`; this.expected = new RegExp(this.myreg); let ok = Utils.search(this.expected, this.lines[i]); if (!ok) {