Test::Debian(3pm)

πŸ“¦
version 0.06 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ NAME ✨

Test::Debian β€” some tests for debian system πŸ’– (yes that's literally the whole pitch, it's giving "small module, big slay")


🌸 SYNOPSIS 🌸

use Test::More;
use Test::Debian;

ok($value, 'test name');
system_is_debian;
package_is_installed 'dpkg';
package_is_installed 'dpkg', 'dpkg is installed';
package_isnt_installed 'kde-base';

ok bestie, that's the whole vibe check right there β€” you pull in Test::More and Test::Debian, and suddenly you're checking whether you're even ON a debian box, whether stuff is installed, whether stuff is not installed. iconic.


πŸ’… DESCRIPTION πŸ’…

The module provides some perl tests for debian system 🐧✨ Like, it hands you a lil grab-bag of test subs you can drop straight into your test files. No cap, that's it, that's the module.

πŸ¦‹ system_is_debian([ $test_name ])

Passes if current OS is debian. That's the whole job. Are we debian? Yes? Slay. No? Test goes πŸ’€.

πŸ“ package_is_installed($pkg_variant [, $test_name ])

Passes if package is installed. πŸŽ€

package_is_installed understands the following syntax:

package1 | package2
package1 (< 1.23) | package2 (> 1.3)

so yeah β€” you can pipe alternatives together with |, and you can throw version constraints in there with < and > inside parens. fr fr, the pipe means "either of these is fine, we're not picky".

🧚 package_isnt_installed($pkg_name [, $test_name ])

Passes if package isn't installed. πŸ™ˆ the reverse girlies, the "please do NOT have this on my box" check.


πŸ‘‘ AUTHOR πŸ‘‘

Dmitry E. Oboukhov, <unera@debian.org<gt>


Copyright (C) 2012 by Dmitry E. Oboukhov

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

tl;dr it's free software, same terms as Perl itself, Perl 5.8.8 or whatever later Perl 5 you've got lying around. 🫢


okay that's the whole page, mwah πŸ’‹ this was perl v5.32.0, dated 2021-01-08, and it's Test::Debian(3pm) β€” go write some tests, bestie, you got this β­πŸ‘‘πŸ’–

πŸ“¦ where this page comes from