1. 20 Oct, 2017 5 commits
  2. 15 Oct, 2017 1 commit
  3. 29 Sep, 2017 1 commit
  4. 22 Sep, 2017 3 commits
  5. 01 Sep, 2017 2 commits
  6. 27 Aug, 2017 8 commits
    • Ryan C. Thompson's avatar
    • Ryan C. Thompson's avatar
      Rename functions and arguments for closure manipulation · 20ec520c
      Ryan C. Thompson authored
      Since the "closures" can also be non-closure lambda expressions (in
      the case where lexical binding is disabled), it's more appropriate to
      refer to them as functions. The names of functions and arguments
      dealing with argument wrapper functions have been modified
      accordingly, as have references to closures in function docstrings.
    • Ryan C. Thompson's avatar
      Declare all variables before first use · b97714df
      Ryan C. Thompson authored
      This eliminates all compiler warnings about free variables.
    • Ryan C. Thompson's avatar
      Implement closure-based expect macro · 929a904d
      Ryan C. Thompson authored
      This redefines the "expect" macro to wrap all its arguments (except
      the matcher) in closures. Matchers are now expected to accept all
      arguments as closures and must "funcall" them to obtain their value.
      This allows matchers to also obtain the unevaluated expression for
      each of their arguments in order to generate more informative error
      messages. All built-in matchers are reimplemented to conform to this
      requirement. This fixes #54.
      In addition, this adds some convenience macros for defining matchers.
      The macro "buttercup-define-matcher-for-unary-function" automatically
      generates a matcher for any predicate function, while
      "buttercup-define-matcher-for-binary-function" does the same for a
      comparison function, and also automatically uses any explainer defined
      by ERT for that function for more precise messages in case of a
      mismatch. This fixes #28. More generally, the
      "buttercup--test-expectation" macro makes it easier to construct the
      non-intuitive return values required by buttercup matchers. This fixes
      the change to closure-based matchers is mostly backward-compatible,
      with the only user-visible diferences being better error messages.
      However, one major backward-incompatible change is the handling of the
      ":to-throw" matcher, which no longer requires its argument to be
      wrapped in a lambda form, since the "expect" macro now does so
      automatically for all matchers. This fixes #41. In order to aid
      migration, it would be helpful to add a warning when a function
      returns another function, which is a likely indicator that the desired
      expression was wrongly wrapped in a lambda form and wasn't evaluated.
      Another new feature is support for issuing warnings during tests. Any
      warning issued during a test is collected in a special buffer and
      displayed after the test finishes.
      Tests are added for all new functionality, and existing tests are
      adapted to the new code.
    • Ryan C. Thompson's avatar
      Do not suppress errors while loading test files · 31e765b9
      Ryan C. Thompson authored
      This commit removes the "condition-case" that suppresses errors while
      loading test files. Suppressing these errors can cause buttercup to
      only run the tests that were defined before the error occurred. This
      can cause buttercup to report a successful outcome even though some
      tests were never run.
      Fixes #107.
    • Ryan C. Thompson's avatar
      Exec code blocks in markdown labeled as "emacs-lisp" and "elisp" · c032c8fb
      Ryan C. Thompson authored
      Markdown mode's "markdown-edit-code-block" command automatically uses
      "emacs-lisp-mode" for the code block if the type is "emacs-lisp" or
      "elisp", so those should be supported.
    • Ryan C. Thompson's avatar
      Run test-buttercup.el before tests in writing-tests.md · 07cf64bb
      Ryan C. Thompson authored
      Since make stops at the first failed command, and "test-buttercup.el"
      contains more low-level tests that are usually more helpful when
      debugging, it makes sense to run it first.
    • Ryan C. Thompson's avatar
      Fix a problem with reporter tests suppressing failure messages · 389dc438
      Ryan C. Thompson authored
      The test for the batch reporter was inappropriately clearing the list
      of test failures, so that any failures that occurred before that test
      would not have their errors shown.
      Fixes #108.
  7. 26 Aug, 2017 2 commits
  8. 25 Aug, 2017 1 commit
  9. 12 Aug, 2017 5 commits
    • Ryan C. Thompson's avatar
      Fix several edge cases in "spy-on" · 6ad9565c
      Ryan C. Thompson authored
      The "spy-on" function now works on commands and autoloaded functions,
      and checks for the right number of arguments for each modifier.
      For commands, it preserves the interactive form of the original
      command, unless the given replacement overrides it (in which case a
      warning is issued). This means that the spy can be executed as a
      command in the same way as the original.
      For autoloads, "spy-on" simply forces the load to happen so that the
      function becomes an ordinary function instead of an autoloaded one.
      Finally, all modifiers now check whether the correct number of args
      was provided instead of silently ignoring extra ones. In addition, the
      argument for ":and-throw-error" now defaults to "error" if a more
      specific error type is not specified.
      Tests are added for all three features.
      This should fix #56 and #103.
      Add autoload test
    • Ryan C. Thompson's avatar
      Fix a logic error in spy tests · a535e519
      Ryan C. Thompson authored
      If "before-each" is used, then some tests, like "restores the old
      value after a spec run", become meaningless, since the before-each
      form is always going to restore the value anyway. This commit uses
      "before-all" instead.
    • Ryan C. Thompson's avatar
      Implement configurable stack traces · e8140aa8
      Ryan C. Thompson authored
      Use the "--traceback" command-line option or set the
      "buttercup-stack-frame-style" variable to use this. Possible values
      are "crop", "full", and "pretty". This option still needs to be added
      to the documentation.
    • Ryan C. Thompson's avatar
      Allow ERT "should" and similar to work with buttercup · 39c7d8c3
      Ryan C. Thompson authored
      This defines a new macro "buttercup-with-converted-ert-signals" that
      converts ERT failure and test-skipping signals to the equivalent
      buttercup ones. This allows "should" and other ERT test functions to
      work within buttercup test specs, thus making it easier for people to
      port ERT tests to buttercup.
      The test for the macro expansion of "it" has been modified for the new
      expansion, and a few tests have been added to verify the new
    • Ryan C. Thompson's avatar
      Show a message about duplicate spec names · 46882f8f
      Ryan C. Thompson authored
      This should be a warning, but for some reason "display-warning" is a
      no-op inside of "buttercup-describe".
      Fixes #77.
  10. 29 Jul, 2017 2 commits
  11. 01 Jul, 2017 2 commits
  12. 20 May, 2017 1 commit
  13. 21 Apr, 2017 3 commits
  14. 17 Apr, 2017 1 commit
  15. 15 Apr, 2017 2 commits
  16. 01 Apr, 2017 1 commit