branch: elpa/beancount commit c5e02d45347183eec7d7eb267bc5aa760cf9d39e Author: Daniele Nicolodi <dani...@grinta.net> Commit: Daniele Nicolodi <dani...@grinta.net>
beancount.el: Correct option names list And add a test that verifies that beancount-mode recognises all options implemented in beancount. Use the output of `bean-doctor list_options` to obtain a list of the option names. --- beancount-tests.el | 13 +++++++++++++ beancount.el | 7 ++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/beancount-tests.el b/beancount-tests.el index 75981a547e..25eed88cab 100644 --- a/beancount-tests.el +++ b/beancount-tests.el @@ -132,3 +132,16 @@ Return a list of substrings each followed by its face." Expenses:Example 1.00 USD Assets:Checking 1.00 USD ")))) + +(ert-deftest beancount/options-001 () + "Verify that beancount-mode recognises all options implemented +in beancount. Use the output of bean-doctor to get a list of +known option nmaes." + :tags '(options) + (let (options) + (with-temp-buffer + (shell-command "bean-doctor list_options" t) + (goto-char (point-min)) + (while (re-search-forward "^option\\s-+\"\\([a-z_]*\\)\"" nil t) + (setq options (cons (match-string-no-properties 1) options)))) + (should (equal (sort options #'string<) beancount-option-names)))) diff --git a/beancount.el b/beancount.el index a4183d6b0e..141ee30fd3 100644 --- a/beancount.el +++ b/beancount.el @@ -168,13 +168,15 @@ to align all amounts." "account_previous_conversions" "account_previous_earnings" "account_rounding" - "bookin_algorithm" - "bookin_method" + "allow_deprecated_none_for_tags_and_links" + "allow_pipe_separator" + "booking_method" "conversion_currency" "documents" "infer_tolerance_from_cost" "inferred_tolerance_default" "inferred_tolerance_multiplier" + "insert_pythonpath" "long_string_maxlines" "name_assets" "name_equity" @@ -182,7 +184,6 @@ to align all amounts." "name_income" "name_liabilities" "operating_currency" - "plugin" "plugin_processing_mode" "render_commas" "title"))