QTEST(1)

πŸ“¦
version 2.11.2 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

qtest β€” Inline (Unit) Tests for OCaml, bestie ✨


🌸 DESCRIPTION 🌸

okay so, real talk: qtest is the girl who writes your unit tests inside your own code and then goes and extracts them for you. It's giving "inline tests, but make it a whole workflow." πŸŽ€

Here's how you actually call her:

USAGE: qtest [options] extract <file.mli?>...

yes the ? on <file.mli?> is real and it is intentional, don't come for her πŸ’…

✨ OPTIONS ✨

  • -o, --output <path> β€” (default: standard output) Opens or creates a file for output, and the resulting file is an OCaml source file containing all the tests. no cap. 🫢
  • -p, --preamble <string> β€” (default: empty) Adds code to the tests preamble. typically this is gonna be an instruction of the form 'open Module' β€” iconic move, honestly. πŸ’–
  • --preamble-file <path> β€” Adds the contents of the given file to the tests preamble. same vibe as --preamble but she reads it off the disk instead. πŸ“‚
  • --run-only <function name> β€” Only generates tests pertaining to this function, as indicated by the test header. very "I only have energy for one of you today" energy πŸ™ˆ
  • --shuffle β€” (default: turned off) Toggles test execution order randomisation. > heads up bestie: submodules using injection are not shuffled, so don't @ me when they come out in the same order every time 😭
  • -help β€” Display this list of options πŸ‘‘
  • --help β€” Display this list of options πŸ‘‘

lowkey the two help flags do the exact same thing and that's just the vibe, periodt ✨

and that's the whole page, babe β€” go write some inline tests, they're literally about to eat πŸ’…

this was qtest version 2.9, dated September 2018 β€” yes she's a little vintage and yes she still slays πŸŽ€βœ¨ bye bestie, mwah 🫢