diff options
Diffstat (limited to 'tests/test-gloss--reload-smoke.el')
| -rw-r--r-- | tests/test-gloss--reload-smoke.el | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test-gloss--reload-smoke.el b/tests/test-gloss--reload-smoke.el new file mode 100644 index 0000000..14af147 --- /dev/null +++ b/tests/test-gloss--reload-smoke.el @@ -0,0 +1,24 @@ +;;; test-gloss--reload-smoke.el --- Smoke test for gloss-reload -*- lexical-binding: t -*- + +;; SPDX-License-Identifier: GPL-3.0-or-later + +;;; Commentary: +;; Smoke test for `gloss-reload'. Clears the in-memory cache, then the +;; next lookup repopulates from disk (handled by core's mtime path). + +;;; Code: + +(require 'ert) +(require 'gloss) +(require 'testutil-gloss) + +(ert-deftest test-gloss-reload-resets-and-repopulates-cache () + "Smoke: reload clears the cache and the next lookup re-reads from disk." + (gloss-test--with-temp-glossary gloss-test--sample-content + (gloss-core-lookup "anaphora") + (should gloss-core--cache) + (gloss-reload) + (should (gloss-core-lookup "anaphora")))) + +(provide 'test-gloss--reload-smoke) +;;; test-gloss--reload-smoke.el ends here |
