Test::Folder(3pm)

πŸ“¦
version 1.16 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Test::Folder β€” the vibe check for your folders πŸ’–

okay so bestie, welcome to Test::Folder, a lil Perl module from the User Contributed Perl Documentation corner of the CPAN universe, and it does exactly one thing and does it gorgeously: it tests folder attributes. like, is it there? is it empty? can we even read it? all that. no cap. ✨


🌸 NAME 🌸

Test::Folder β€” test folder attributes πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

use Test::More ...;
use Test::Folder;

that's it. that's the whole setup. you bring Test::More, this module brings the folder drama. πŸ¦‹


✨ DESCRIPTION ✨

so this module is literally a collection of test utilities for folder attributes. it's not out here trying to be a whole framework, okay? it's the bestie that shows up with exactly the right snack at exactly the right moment. πŸ“

the way that you use it: team it up with Test::More inside your test programs. Test::More handles the "ok / not ok" energy, Test::Folder handles the "but is the FOLDER okay though" energy. iconic duo, honestly. πŸ‘‘


πŸ”₯ FUNCTIONS πŸ”₯

every single one of these bad boys takes a FOLDERNAME and an optional TESTNAME, and every single one is giving the same "ok if… , not ok otherwise" structure. slay.

  • folder_exists_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder exists, and not ok otherwise. the classic. the moment. πŸ’–
  • folder_not_exists_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder does not exist, and not ok otherwise. ghosting the filesystem, respectfully. πŸ‘»
  • folder_empty_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder is empty (contains no files or subfolders), and not ok otherwise. Marie Kondo vibes: does it spark joy, or does it spark clutter? ✨
  • folder_not_empty_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder is not empty (contains any files or subfolders), and not ok otherwise. highkey the opposite of the last one, as the name suggests. πŸ’…
  • folder_readable_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder is readable, and not ok otherwise. can we peek? permission check says yes. πŸ‘€
  • folder_not_readable_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder is not readable, and not ok otherwise. no peeking allowed, periodt. πŸ™ˆ
  • folder_writable_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder is writable, and not ok otherwise. can we drop files in here and run? oh we absolutely can. πŸ”₯
  • folder_not_writable_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder is not writable, and not ok otherwise. locked down, hands off, we simply do not touch. πŸ’€
  • folder_executable_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder is executable, and not ok otherwise. yes bestie, folders get the executable bit too, and yes it matters, iykyk. 🧚
  • folder_not_executable_ok(FOLDERNAME [, TESTNAME] ) β€” ok if the folder is not executable, and not ok otherwise. no walking through this door, babe. 🌈

🌟 TO DO 🌟

there are probably some more folder attributes that can be tested. if you need them, please ask (or better yet, contribute code!). genuinely β€” the maintainer is asking nicely and the group chat is open. 🫢


πŸ’œ AUTHOR πŸ’œ

Martin 'Kingpin' Thurn, "mthurn at cpan.org", <http://tinyurl.com/nn67z>.

go say hi, he built this whole thing. πŸ‘‘


🚨 BUGS 🚨

please report any bugs or feature requests to "bug-test-dir at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Dir>. i will be notified, and then you'll automatically be notified of progress on your bug as i make changes.

so basically you file it, and the updates come straight back to you. communication, we love to see it. πŸ’Œ


🫢 SUPPORT 🫢

you can find documentation for this module with the perldoc command.

perldoc Test::Folder

you can also look for information at:

four whole places to lurk. pick your fave. ✨


πŸŽ€ ACKNOWLEDGEMENTS πŸŽ€

bestie. this section is literally empty in the original. nothing in it. a blank canvas. we're just gonna sit here with it in respectful silence. πŸ•―οΈ

Copyright (C) 2007-2008 Martin 'Kingpin' Thurn

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

free software, same terms as Perl itself, no cap. πŸ’–


and that's the whole page, babe. 🌸 this was Test::Folder(3pm) from perl v5.36.0, dated 2022-10-13. mwah, take care of your folders and they'll take care of you. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from