From a099261b58e9c58dfb07c666e6b29b585a026f3f Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Mon, 30 Sep 2024 08:41:47 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- nur_src/cli/Application.php | 2 +- src/{app => }/app.php | 9 +++---- src/app/RunFile.php | 1 + src/app/cli/include-launcher.php | 2 +- src/app/cli/template-bg-launcher.php | 2 +- src/os/sh.php | 2 +- src/tools/BgLauncherApp.php | 2 +- src/tools/SteamTrainApp.php | 2 +- tests/app/LongTaskApp.php | 20 -------------- tests/{wip => }/app/argsTest.php | 2 +- tests/app/launcherTest.php | 20 -------------- tests/{wip/app/app2Test.php => appTest.php} | 29 ++++++++++++--------- tests/wip/app/appTest.php | 18 ------------- wip_app/cli/Application.php | 2 +- 14 files changed, 29 insertions(+), 84 deletions(-) rename src/{app => }/app.php (99%) delete mode 100644 tests/app/LongTaskApp.php rename tests/{wip => }/app/argsTest.php (97%) delete mode 100644 tests/app/launcherTest.php rename tests/{wip/app/app2Test.php => appTest.php} (85%) delete mode 100644 tests/wip/app/appTest.php diff --git a/nur_src/cli/Application.php b/nur_src/cli/Application.php index 55d6989..65f975d 100644 --- a/nur_src/cli/Application.php +++ b/nur_src/cli/Application.php @@ -12,7 +12,7 @@ use nur\path; use nur\sery\app\launcher; use nur\sery\app\RunFile; use nur\sery\cl; -use nur\sery\app\app; +use nur\sery\app; use nur\sery\output\log as nlog; use nur\sery\output\msg as nmsg; use nur\sery\output\console as nconsole; diff --git a/src/app/app.php b/src/app.php similarity index 99% rename from src/app/app.php rename to src/app.php index 5ddbfcb..0e1f04f 100644 --- a/src/app/app.php +++ b/src/app.php @@ -1,15 +1,12 @@ 0) { - msg::print("step $step"); - sleep(1); - } - } -} diff --git a/tests/wip/app/argsTest.php b/tests/app/argsTest.php similarity index 97% rename from tests/wip/app/argsTest.php rename to tests/app/argsTest.php index 8a8b1f1..b2bdef1 100644 --- a/tests/wip/app/argsTest.php +++ b/tests/app/argsTest.php @@ -1,6 +1,6 @@ false])); - self::assertSame(["--a"], launcher::verifix_args(["a" => true])); - self::assertSame(["--a", "value"], launcher::verifix_args(["a" => "value"])); - self::assertSame(["--a", "52"], launcher::verifix_args(["a" => 52])); - self::assertSame(["--aa-bb", "value"], launcher::verifix_args(["aaBb" => "value"])); - self::assertSame(["--aa-bb", "value"], launcher::verifix_args(["aa-Bb" => "value"])); - self::assertSame(["--aa-bb", "value"], launcher::verifix_args(["aa_Bb" => "value"])); - self::assertSame(["---aa-bb", "value"], launcher::verifix_args(["_aa_Bb" => "value"])); - } -} diff --git a/tests/wip/app/app2Test.php b/tests/appTest.php similarity index 85% rename from tests/wip/app/app2Test.php rename to tests/appTest.php index a5bcf29..8fbac6a 100644 --- a/tests/wip/app/app2Test.php +++ b/tests/appTest.php @@ -1,12 +1,12 @@ "$projdir/devel/var", "logdir" => "$projdir/devel/log", "profile" => "devel", + "appgroup" => null, "name" => "my-application1", "title" => null, ], $app1->getParams()); @@ -44,6 +45,7 @@ namespace nur\sery\wip\app { "vardir" => "$projdir/devel/var", "logdir" => "$projdir/devel/log", "profile" => "devel", + "appgroup" => null, "name" => "my-application2", "title" => null, ], $app2->getParams()); @@ -68,6 +70,7 @@ namespace nur\sery\wip\app { "vardir" => "$projdir/devel/var", "logdir" => "$projdir/devel/log", "profile" => "devel", + "appgroup" => null, "name" => "my-application1", "title" => null, ], myapp::get()->getParams()); @@ -86,6 +89,7 @@ namespace nur\sery\wip\app { "vardir" => "$projdir/devel/var", "logdir" => "$projdir/devel/log", "profile" => "devel", + "appgroup" => null, "name" => "my-application2", "title" => null, ], myapp::get()->getParams()); @@ -93,13 +97,14 @@ namespace nur\sery\wip\app { } } -namespace nur\sery\wip\app\impl { - use nur\cli\Application2; +namespace nur\sery\impl { + + use nur\sery\app\cli\Application; use nur\sery\os\path; - use nur\sery\app\app; + use nur\sery\app; class config { - const PROJDIR = __DIR__.'/../../..'; + const PROJDIR = __DIR__.'/..'; static function get_projdir(): string { return path::abspath(self::PROJDIR); @@ -112,13 +117,13 @@ namespace nur\sery\wip\app\impl { } } - class MyApplication1 extends Application2 { + class MyApplication1 extends Application { const PROJDIR = config::PROJDIR; function main() { } } - class MyApplication2 extends Application2 { + class MyApplication2 extends Application { const PROJDIR = null; function main() { diff --git a/tests/wip/app/appTest.php b/tests/wip/app/appTest.php deleted file mode 100644 index 4ea66a4..0000000 --- a/tests/wip/app/appTest.php +++ /dev/null @@ -1,18 +0,0 @@ -call($app, "$name")); - } -} diff --git a/wip_app/cli/Application.php b/wip_app/cli/Application.php index 9c43c53..0f3d3d5 100644 --- a/wip_app/cli/Application.php +++ b/wip_app/cli/Application.php @@ -5,7 +5,7 @@ use Exception; use nur\cli\ArgsException; use nur\cli\ArgsParser; use nur\config; -use nur\sery\app\app; +use nur\sery\app; use nur\sery\app\RunFile; use nur\sery\ExitError; use nur\sery\output\console;