Are there conventions for function names when using the Perl Test :: More or Test :: Simple modules?
I specifically ask a question about the names of the functions that are used to configure the test environment before the test and disrupt the environment after the successful completion of the test (s).
amuses
Rob
I do not think there are such agreements.
The only way to do this is perhaps to use BEGIN / END blocks if resources will be used throughout the file.
, , - , / .. , , .
- ...
BEGIN { # If you want to set some global db setting/file setting/INC changes etc } # Tests functionality 1... { # have fun .... } # Tests functionality 2... { # have more fun .... } END { # Clean up the BEGIN changes }
, perl... http://perlandmac.blogspot.com/2007/08/using-perl-testsimple-and-testmore.html
XUnit, Test::Class. Test(setup) Test(teardown) , , , . ( , ) .
Test(setup)
Test(teardown)
, , http://perldoc.perl.org/Test/More.html , .
.
perldocs, .
XUnit.
Jagmal, BEGIN END , , . , .. .t .
Test:: Most, , . .
. , BEGIN END, , , , .
,
Test:: More , () Perl. , , Jagmal, , .
script. , ( unit test) , , .
, , - Test:: More for Test:: Most
Perl . , , Perl script.
, , , .
, , .
, t/*. t CPAN. , , , .
If you can also take part in acceptance tests, such as Ruby Cucumber, take a look at this small example http://github.com/kesor/p5-cucumber , which uses Test :: More and the cucumber style of acceptance tests.
Source: https://habr.com/ru/post/1696694/More articles:Как определить, соответствует ли данная дата в летнее время для заданного часового пояса в .NET 2.0? - timezoneIs there an easy way to determine what factors contribute to the size of an HTML element? - htmlWhy is my web control invalid? - asp.netLightweight 3D .NET graphics engine (Compact and Full Framework) - c #Definition of members of local groups through C # - c #fprintf returns success but cannot write an existing file - cHow can I convince GroovyShell to maintain state over eval () calls? - javaManaging / using libraries with builds Debug vs Release builds - release-buildsA service for creating an audio podcast from a video? - videoMatch collections with LINQ - linqAll Articles