test(emacs/lean-option-test): add lean-test-update-string-alist-default
This commit is contained in:
parent
b650793b33
commit
18e6481ce3
1 changed files with 20 additions and 6 deletions
|
@ -5,14 +5,28 @@
|
|||
;;
|
||||
|
||||
(require 'ert)
|
||||
(require 'lean-variable)
|
||||
(require 'lean-settings)
|
||||
(require 'lean-option)
|
||||
|
||||
(ert-deftest lean-test-update-string-alist ()
|
||||
(lean-update-option-alist "pp::implicit" 'true)
|
||||
(lean-update-option-alist "pp.implicit" 'true)
|
||||
(should
|
||||
(equal (assoc-string "pp::implicit" lean-global-option-alist)
|
||||
'("pp::implicit" . true)))
|
||||
(lean-update-option-alist "pp::implicit" 'false)
|
||||
(equal (assoc-string "pp.implicit" lean-global-option-alist)
|
||||
'("pp.implicit" . true)))
|
||||
(lean-update-option-alist "pp.implicit" 'false)
|
||||
(should
|
||||
(equal (assoc-string "pp::implicit" lean-global-option-alist)
|
||||
'("pp::implicit" . false))))
|
||||
(equal (assoc-string "pp.implicit" lean-global-option-alist)
|
||||
'("pp.implicit" . false))))
|
||||
|
||||
(ert-deftest lean-test-update-string-alist-default ()
|
||||
(setq lean-global-option-alist nil)
|
||||
(should (string= (lean-option-string)
|
||||
(format "-D%s=%d"
|
||||
"pp.width"
|
||||
lean-default-pp-width)))
|
||||
(lean-update-option-alist "pp.width" 80)
|
||||
(should (string= (lean-option-string)
|
||||
(format "-D%s=%d"
|
||||
"pp.width"
|
||||
80))))
|
||||
|
|
Loading…
Reference in a new issue