nur-sery/tests/app/launcherTest.php

21 lines
975 B
PHP
Raw Normal View History

2024-06-13 07:28:11 +04:00
<?php
namespace nur\sery\app;
use nulib\tests\TestCase;
class launcherTest extends TestCase {
2024-06-16 13:31:11 +04:00
function testVerifix_args() {
self::assertSame([], launcher::verifix_args([]));
self::assertSame(["a"], launcher::verifix_args(["a"]));
self::assertSame(["a", "--b"], launcher::verifix_args(["a", "--b"]));
self::assertSame([], launcher::verifix_args(["a" => 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"]));
}
2024-06-13 07:28:11 +04:00
}