Arch::...amework(3pm)

πŸ“¦ version 0.5.2, in ubuntu jammy

πŸ’– 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 path
  • archives β€” use a different archives directory
  • trees β€” 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 mentions make_category, make_branch, and make_version too, but the detailed docs only cover new, the getters, make_archive, and make_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