Arch::Test::Tree(3pm)
π Arch::Test::Tree π
okay bestie, welcome to the Arch::Test::Tree page β it's part of the Perl docs (the user-contributed corner of the manual, section 3pm, iykyk). this is where you go when you wanna spin up fake Arch project trees for testing, fast. no cap. π
β¨ NAME β¨
Arch::Test::Tree β a test framework for Arch-Perl. periodt. π
πΈ SYNOPSIS πΈ
like, here's the vibe:
use Arch::Test::Framework;
my $fw = Arch::Test::Framework->new;
my $tree = $fw->make_tree($dir, $version);
my $dir = $tree->add_dir;
$tree->add_file($dir);
$tree->import;
that's literally it. go off. π₯
π¦ DESCRIPTION π¦
Arch::Test::Tree gives you methods to quickly build and modify Arch project trees inside the Arch::Test framework. it's giving scaffolding. it's giving test-harness energy. it's giving "i need a whole fake project tree and i need it now". π
π METHODS π
here's the full roster, bestie β no skips, no cuts:
new, root, framework, run_tla, add_file, add_dir, add_link, modify_file, rename_file, rename_dir, remove_file, remove_dir, inventory, import, commit.
π new [framework] [path]
creates a brand new Arch::Test::Tree instance for path.
β οΈ bestie, do not call this directly. it's a backstage method. let the framework handle it, fr fr. π«Ά
π root
returns the project tree's root directory. the home base. the main character location. π
π framework
returns the associated Arch::Test::Framework reference. it's the friend the tree came with. π«
π§ run_tla @args
runs tla @args from the tree root. yes, straight from the root. slay. β¨
π add_file [dir [name [content]]]
adds a new file called name in the directory dir, and fills it with content. iconic file creation moment. π
- dir defaults to the project root (
"."). - if name isn't specified, a unique filename gets generated for you. β¨
- if you don't give it content, a default content gets generated. boom.
π add_dir [parent [name]]
adds a new directory under parent, or under "." if parent isn't specified. if name is not given, a unique name gets generated. directory debut, honestly. π
π¦ add_link [parent [name [target]]]
adds a new symbolic link under parent, or under "." if parent isn't specified. if name is not given, a unique name gets generated. and if target is omitted, a (probably) non-existing target gets generated. π (yeah, "probably". we said what we said.)
π
modify_file file [content]
changes file's content to content. and if you don't pass new content? it appends Has been modified. β no cap, that's the literal default. π
πΈ rename_file old new
renames file old to new. returns new. glow-up complete. β¨
π rename_dir old new
renames directory old to new. returns new. same glow-up, but for a folder. π
π₯ remove_file file
deletes file and its associated arch id. it's not just the file, bestie. the arch id goes too. π
π remove_dir dir
recursively deletes dir and its content. recursively. everything inside. gone. dramatic but accurate. π«‘
β inventory [flags]
returns the inventory as generated by running tla inventory flags.
flags default to -Bs if you don't specify them. π
π«Ά import [summary [log]]
creates a "base-0" revision from the tree, using summary as the summary line and log as the log text.
if the tree already contains a log file, summary and log can both be omitted. convenient, right? π
π commit [summary [log]]
commits a "patch-n" revision from the tree, using summary as the summary line and log as the log text.
and yep β if the tree contains a log file, summary and log can be omitted here too. π
π AUTHORS π
- Mikhael Goikhman (
migo@homemail.com--Perl-GPL/arch-perl--devel). - Enno Cramer (
uebergeek@web.de--2003/arch-perl--devel).
absolute legends. we stan. π
and that's the whole page, bestie!! this was Arch::Test::Tree(3pm), from perl v5.20.2, dated 2005-04-14 β yes she's an elder but she still ate π
β¨ mwah, go build some trees π¦πΈ
π¦ 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