aboutsummaryrefslogtreecommitdiff
path: root/test/helpful-unit-test.el
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2019-07-11 00:56:22 +0100
committerWilfred Hughes <me@wilfred.me.uk>2019-07-11 00:56:22 +0100
commit866d5daecb168c0b62c91ccf5dec833d5cdcac5c (patch)
tree466f766d355ea4e2887035cfec5c73126c72548d /test/helpful-unit-test.el
parentddd1f2c6794972e16393614716532fc1753edd31 (diff)
Show the original value for defcustom variables
Fixes #199
Diffstat (limited to 'test/helpful-unit-test.el')
-rw-r--r--test/helpful-unit-test.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el
index 64c9f02..d1d4840 100644
--- a/test/helpful-unit-test.el
+++ b/test/helpful-unit-test.el
@@ -950,3 +950,17 @@ find the source code."
;; loaded.
;;
(helpful-function #'tetris))
+
+(defcustom helpful-test-custom-var 123
+ "I am an example custom variable."
+ :type 'number
+ :group 'helpful)
+
+;; Ensure the current value differs from the original value.
+(setq helpful-test-custom-var 456)
+
+(ert-deftest helpful--original-value ()
+ "Show the original value for defcustom variables."
+ (helpful-variable 'helpful-test-custom-var)
+ (should
+ (s-contains-p "Original Value\n123" (buffer-string))))