Prima::sys::Test(3)

πŸ“¦
version 1.78 Β· 5 versions
, in fedora 44

πŸ’– Prima::sys::Test β€” GUI test tools πŸ’–

okay bestie so this is Prima::sys::Test, a page from the User Contributed Perl Documentation (perl v5.42.3, dated 2026-09-16, if you were wondering). Let's get into it. πŸ¦‹


✨ NAME ✨

Prima::sys::Test</purpose> β€” GUI test tools. that's it, that's the whole name, short and iconic. πŸ’…


🌸 DESCRIPTION 🌸

so this module is like a lil toolkit β€” it holds a small set of tools that you use for testing Prima-related code, and it plays nice with the standard perl Test:: suite. basically it's the bestie that holds your hand while you test GUI stuff. 🫢


πŸŽ€ SYNOPSIS πŸŽ€

here's the vibe, literally copy this energy:

use Test::More;
use Prima::Test;
plan tests => 1;
ok( create_window, "can create window");

look at that. clean. slays. ✨


🌈 USAGE 🌈

πŸ’œ Methods πŸ’œ

  • create_window %args β€” creates a standard simple Prima window and hands it right back to you. that's it, that's the job. πŸ‘‘
  • set_flag, get_flag, reset_flag β€” these three are the flag squad 🚩 they manipulate the state of the internal $flag, and that $flag is the thing that stops the event loop once it's set. so like, very important lil flag, no cap.
  • wait_flag β€” waits for the flag to be raised, but only for 500 msec ⏱️ and if it never shows up, it just returns false. no drama, just false.

🌟 no-X11 environment 🌟

by default this module fires a skip_all condition if you're running without an X11 connection. very "not me catching an error" energy. πŸ™ˆ

but if your test can actually run without X11, do it like this:

use Prima::Test qw(noX11);

and that tells the module not to do any GUI initialization at all. periodt. πŸ’…


πŸ‘‘ AUTHORS πŸ‘‘

the icons behind this:

  • Upasana Shukla, <me@upasana.me>
  • Dmitry Karasik, <dmitry@karasik.eu.org>

πŸ¦‹ SEE ALSO πŸ¦‹

go peek at these, iykyk:

  • Prima
  • t/*/*.t

and that's the whole page bestie!! πŸ’– this was perl v5.42.3, dated 2026-09-16, and it's the User Contributed Perl Documentation's Prima::sys::Test(3) page β€” go forth and test ur GUI code, ur doing amazing, mwah πŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from