diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2017-12-16 15:13:56 +0000 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2017-12-16 15:16:12 +0000 |
| commit | be1a4a892352126fe8d6c7dbc0a49df70cac4cf5 (patch) | |
| tree | b5b27c71089e0f5b6f163360ab3eb51f2c2dc9f9 /test | |
| parent | f0200aa32c820a8314518c4762da8529958eac97 (diff) | |
Don't crash when the underlying buffer has been killed
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit-test.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit-test.el b/test/unit-test.el index e36f6df..2c1388b 100644 --- a/test/unit-test.el +++ b/test/unit-test.el @@ -195,3 +195,14 @@ buffers lying around." ;; Don't crash on large plists using keywords. (helpful--pretty-print '(:foo foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo :bar bar))) + +(ert-deftest helpful-update-after-killing-buf () + "If we originally looked at a variable in a specific buffer, +and that buffer has been killed, handle it gracefully." + ;; Don't crash if the underlying buffer has been killed. + (let (helpful-buf) + (with-temp-buffer + (helpful-variable 'tab-width) + (setq helpful-buf (current-buffer))) + (with-current-buffer helpful-buf + (helpful-update)))) |
