From 83410074b8979c81a064021c5a414212681dacf8 Mon Sep 17 00:00:00 2001 From: Javier Sosa Breyer Date: Sun, 10 Mar 2019 23:19:21 +0100 Subject: [PATCH 1/5] Corregida constante EXPECTED --- tests/checks.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/checks.test.js b/tests/checks.test.js index b218ce6..ef5b0fa 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; From a9281c1682d2a785d9fb7eedad3c20cd7ccb7a2b Mon Sep 17 00:00:00 2001 From: Javier Sosa Breyer Date: Sun, 10 Mar 2019 23:21:00 +0100 Subject: [PATCH 2/5] =?UTF-8?q?Corregido=20error=20l=C3=ADnea=2090?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/checks.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checks.test.js b/tests/checks.test.js index ef5b0fa..94e4906 100644 --- a/tests/checks.test.js +++ b/tests/checks.test.js @@ -90,7 +90,7 @@ 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); } From 780d9836330f679394345ff7b7c94dc09ddcc07d Mon Sep 17 00:00:00 2001 From: Javier Sosa Breyer Date: Sun, 10 Mar 2019 23:21:38 +0100 Subject: [PATCH 3/5] =?UTF-8?q?Corregido=20error=20l=C3=ADnea=2096?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/checks.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checks.test.js b/tests/checks.test.js index 94e4906..bb1784b 100644 --- a/tests/checks.test.js +++ b/tests/checks.test.js @@ -96,7 +96,7 @@ describe("mooc_node-mod1_types_sentences", function () { } }); - 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; From f6a5f342a5244fa8c8920cbcfa5bb4d80df4170d Mon Sep 17 00:00:00 2001 From: Javier Sosa Breyer Date: Sun, 10 Mar 2019 23:22:40 +0100 Subject: [PATCH 4/5] =?UTF-8?q?Corregidas=20expresiones=20regulares=20l?= =?UTF-8?q?=C3=ADneas=20153=20y=20177?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/checks.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/checks.test.js b/tests/checks.test.js index bb1784b..efdbda5 100644 --- a/tests/checks.test.js +++ b/tests/checks.test.js @@ -153,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) { @@ -177,7 +177,7 @@ describe("mooc_node-mod1_types_sentences", function () { let i = 0; for (let d = 0; d <= 22; ++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) { From cc048b8f09674992606cab89e87646a96c25af05 Mon Sep 17 00:00:00 2001 From: Javier Sosa Breyer Date: Sun, 10 Mar 2019 23:23:22 +0100 Subject: [PATCH 5/5] =?UTF-8?q?Corregido=20bucle=20for=20l=C3=ADnea=20175?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/checks.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checks.test.js b/tests/checks.test.js index efdbda5..32dcf62 100644 --- a/tests/checks.test.js +++ b/tests/checks.test.js @@ -175,7 +175,7 @@ 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.expected = new RegExp(this.myreg);