BUTTERCUP(1)

🌸 BUTTERCUP(1) β€” the buttercup manual, bestie edition 🌸

okay so you found buttercup(1) from the General Commands Manual and honestly? iconic. it's behaviour-driven testing for Emacs Lisp packages and it's about to be your whole personality. let's go πŸ’…


✨ NAME ✨

buttercup β€” behaviour-driven testing for Emacs Lisp packages 🧚


✨ SYNOPSIS ✨

buttercup [-h|--help DIR] [-L|--directory DIR] [-f|--funcall FUNCTION]
[-l|--load FILE] [--eval|--execute EXPR] [--p|--pattern PATTERN]
[--c|--no-color] [--traceback STYLE] dir...

✨ DESCRIPTION ✨

buttercup is the command that spins up the Buttercup testing framework for Emacs Lisp addons β€” and it runs the tests it finds in the directories you hand it on the command line. that's it, that's the vibe. you give it dirs, it gives you answers πŸ¦‹


✨ OPTIONS ✨

  • -h, --help β€” shows you the usage info. the classic "help me bestie" flag πŸ’–
  • -p PATTERN, --pattern PATTERN β€” only run tests in files that match the Emacs regular expression PATTERN. and yes you can pass this one multiple times, stack 'em up πŸ‘‘
  • -L DIR, --directory DIR, -f FUNCTION, --funcall FUNCTION, -l FILE, --load FILE, --eval EXPR, --execute EXPR β€” these all get passed along when Emacs is invoked in batch mode to run the test suite. like, for example, most invocations will pass -L . so the current project gets pulled into the load-path. you can pass these multiple times too. for the full rundown on each one, go see emacs(1) 🫢
  • -c PATTERN, --no-color PATTERN β€” turns off Buttercup's coloured output. no rainbow, no sparkle, just plain text 😭
  • --traceback STYLE β€” when it prints backtraces for errors that pop up during tests, this picks the STYLE. the available styles are:
    • "full" β€” shows the full function call for each stack frame, all on a single line
    • "crop" β€” truncates each stack frame to 80 characters, and this one is the default
    • "pretty" β€” uses Emacs' pretty-printing facilities to print each stack frame, and it also annotates each frame with a lambda or M to tell you whether it's a normal function call or a macro/special form. so fancy, so extra, obsessed πŸ”₯
heads up bestie: "crop" is the default, so if you don't say anything you're getting 80-character frames whether you asked or not πŸ’€

that's the whole page, no cap. this was BUTTERCUP(1) from the General Commands Manual β€” and that's the sign-off, mwah πŸ’œβœ¨

πŸŽ€ bye bestie, go write some tests πŸŽ€