From c6c979b0017bc70ee94108353c27739f51d8dc6a Mon Sep 17 00:00:00 2001 From: Gregor Date: Fri, 6 Nov 2020 21:22:23 +0100 Subject: [PATCH] Some pushing around of files --- tests/NTest/NTest.md | 2 +- tests/NTest/{NTest_test.lua => NTest_NTest.lua} | 0 tests/{NTest/tests/file.lua => NTest_file.lua} | 10 ---------- tests/{NTest/tests/tmr.lua => NTest_tmr.lua} | 0 4 files changed, 1 insertion(+), 11 deletions(-) rename tests/NTest/{NTest_test.lua => NTest_NTest.lua} (100%) rename tests/{NTest/tests/file.lua => NTest_file.lua} (95%) rename tests/{NTest/tests/tmr.lua => NTest_tmr.lua} (100%) diff --git a/tests/NTest/NTest.md b/tests/NTest/NTest.md index 98b11fed9a..6aa3425b47 100644 --- a/tests/NTest/NTest.md +++ b/tests/NTest/NTest.md @@ -3,7 +3,7 @@ | :----- | :-------------------- | :---------- | :------ | | 2020-11-01 | [Gregor Hartmann](https://github.com/HHHartmann) | [Gregor Hartmann](https://github.com/HHHartmann) | [NTest.lua](NTest.lua) | -NTest is a test system for NodeMCU which is originally based on gambiarra. It is designed to run on chip but also runs on the host using luac.cross. +NTest is a test system for NodeMCU which is originally based on gambiarra. It is designed to run on chip but the selftest also runs on the host using luac.cross. !!! attention You will have to use LFS to run this as it is too big to fit in memory. diff --git a/tests/NTest/NTest_test.lua b/tests/NTest/NTest_NTest.lua similarity index 100% rename from tests/NTest/NTest_test.lua rename to tests/NTest/NTest_NTest.lua diff --git a/tests/NTest/tests/file.lua b/tests/NTest_file.lua similarity index 95% rename from tests/NTest/tests/file.lua rename to tests/NTest_file.lua index 284dcea790..2d3e4fef3b 100644 --- a/tests/NTest/tests/file.lua +++ b/tests/NTest_file.lua @@ -9,12 +9,6 @@ local function cleanup() end end -local function buildfn(fn, ...) - local params = {...} - local fnp = function() fn(unpack(params)) end - return fnp -end - N.test('exist', function() cleanup() nok(file.exists("non existing file"), "non existing file") @@ -170,8 +164,6 @@ N.test('open non existing', function() testopen(nok, "testfile", "r+") testopen(ok, "testfile", "w+") testopen(ok, "testfile", "a+") - - --fail(buildfn(file.open, "testfile"), "errormsg", "x") -- shouldn't this fail? end) N.test('open existing', function() @@ -190,8 +182,6 @@ N.test('open existing', function() testopen("r+", 0) testopen("w+", 0) testopen("a+", 11) - - --fail(buildfn(file.open, "testfile"), "errormsg", "x") -- shouldn't this fail? end) N.test('remove', function() diff --git a/tests/NTest/tests/tmr.lua b/tests/NTest_tmr.lua similarity index 100% rename from tests/NTest/tests/tmr.lua rename to tests/NTest_tmr.lua