From 9e2036620693856e36fde34cd26e50c1688e1b33 Mon Sep 17 00:00:00 2001 From: Fang Deng Date: Mon, 18 Sep 2023 23:33:43 -0400 Subject: [PATCH] Fix unit tests --- pew/site-lisp/pewcfg/tests/test-pewcfg-core.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pew/site-lisp/pewcfg/tests/test-pewcfg-core.el b/pew/site-lisp/pewcfg/tests/test-pewcfg-core.el index b03d3b13..07154ea1 100644 --- a/pew/site-lisp/pewcfg/tests/test-pewcfg-core.el +++ b/pew/site-lisp/pewcfg/tests/test-pewcfg-core.el @@ -127,15 +127,16 @@ ;;; Test :custom (expect-equal "Test :custom: Normalize" '(('(foo foovalue nil nil "foodoc") - '(bar barvalue nil nil nil))) + '(bar barvalue nil nil "Set by pewcfg:custom"))) (pewcfg::normalize--:custom '((foo foovalue "foodoc") (bar barvalue)))) (expect-equal "Test :custom: Generate" - `((custom-theme-set-variables - ',pewcfg::custom-theme - '(foo foovalue nil nil "foodoc") - '(bar barvalue nil nil nil))) + `((let ((custom--inhibit-theme-enable nil)) + (custom-theme-set-variables + ',pewcfg::custom-theme + '(foo foovalue nil nil "foodoc") + '(bar barvalue nil nil nil)))) (pewcfg::generate--:custom `'(foo foovalue nil nil "foodoc") `'(bar barvalue nil nil nil))) @@ -150,6 +151,10 @@ '((customize-set-variable 'foo foovalue "comment")) (pewcfg::generate--:customize 'foo 'foovalue "comment")) + (expect-equal "Test :customize: Generate with default comment" + '((customize-set-variable 'foo foovalue "Set by pewcfg:customize")) + (pewcfg::generate--:customize 'foo 'foovalue)) + ;;; Test :setq (expect-equal "Test :setq: Normalize" '((foo foovalue bar barvalue))