Arch::...amework(3pm)
π Arch::Test::Framework π
okay bestie, so this is Arch::Test::Framework β a test framework for Arch-Perl β¨ it lives in the User Contributed Perl Documentation section of the manual, section 3pm, and it's here to make your unit tests not be a whole entire struggle π«Ά
πΈ SYNOPSIS πΈ
use Arch::Test::Framework;
my $fw = Arch::Test::Framework->new;
my $archive = $fw->make_archive;
my $version = $archive->make_version();
my $tree = $fw->make_tree($version);
#
# do something with $tree
#
$tree->import('initial import');
like... look at that. five lines and you have a whole fake arch universe. it's giving main character energy fr fr π
π¦ DESCRIPTION π¦
Arch::Test::Framework is literally a framework that lets you quickly generate testing data for your arch-perl unit tests β archives, versions, trees, changesets, all of it, etc etc π
no cap, that's the whole vibe. it makes the fake stuff so you can test the real stuff.
β¨ METHODS β¨
here's the full roster, bestie β no skips, no cuts:
new, arch_uid, home_dir, library_dir, archives_dir, trees_dir, make_archive, make_category, make_branch, make_version, make_tree.
π new [%args]
spins up a brand new arch-perl test environment for you β¨ iconic behaviour honestly.
the valid keys for %args are:
homeβ point at an existing test environment you wanna reuse instead of making a fresh one πlibraryβ use a different revision library patharchivesβ use a different archives directorytreesβ use a different project tree directory
and the default values for those last three are "$home/library", "$home/archives", and "$home/trees" respectively. so cozy, so predictable π₯°
you can also pick a different arch user id with the userid key. the default is:
"Arch Perl Test <arch-perl-test@example.com>"
that's the little guy who's gonna be doing all the committing for you π
π arch_uid
π home_dir
π library_dir
π archives_dir
π trees_dir
these five are the getters, bestie β they just hand back the environment parameters exactly as new initialized them. no surprises, no drama, just facts β¨
π make_archive [archive_name]
creates a new archive in the archives directory π¦
if you don't pass an archive_name, it'll generate a unique name for you, so don't stress about it. the archive name is returned. and it also returns an Arch::Test::Archive reference for the archive π
β make_tree version [name]
creates and initializes a new project tree for version β and yes, the init is literally tla init-tree, that's what it's doing under the hood π§
if name isn't specified, a unique identifier gets generated for you instead. returns an Arch::Test::Tree reference for the project tree π³
π AUTHORS π
the absolute legends who made this:
- Mikhael Goikhman (
migo@homemail.com--Perl-GPL/arch-perl--devel). - Enno Cramer β wait no, Enno Cramer (
uebergeek@web.de--2003/arch-perl--devel).
ngl the method list up top mentionsmake_category,make_branch, andmake_versiontoo, but the detailed docs only covernew, the getters,make_archive, andmake_tree. iykyk π that's just how the page is, i'm not gonna pretend otherwise.
and that's the whole page, bestie π«Ά perl v5.20.2, dated 2005-03-28 β yeah she's vintage but she ATE and left no crumbs π β¨ bye mwah π
π¦ where this page comes from
- ubuntu jammy: libarch-perl 0.5.2-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms