mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
* test/lisp/minibuffer-tests.el (completion-table-test-quoting): New test
* test/data/minibuffer-test-cttq$tion: New file-name test data.
This commit is contained in:
parent
d4515f3cab
commit
384d1c47ce
2 changed files with 21 additions and 0 deletions
0
test/data/minibuffer-test-cttq$tion
Normal file
0
test/data/minibuffer-test-cttq$tion
Normal file
|
|
@ -80,5 +80,26 @@
|
|||
(should (equal (try-completion "B-hel" subvtable)
|
||||
"B-hello"))))
|
||||
|
||||
(ert-deftest completion-table-test-quoting ()
|
||||
(let ((process-environment
|
||||
`("CTTQ1=ed" "CTTQ2=et/" ,@process-environment)))
|
||||
(pcase-dolist (`(,input ,output)
|
||||
'(
|
||||
;; Test that $ in files is properly $$ quoted.
|
||||
("data/m-cttq" "data/minibuffer-test-cttq$$tion")
|
||||
;; Test that $$ in input is properly unquoted.
|
||||
("data/m-cttq$$t" "data/minibuffer-test-cttq$$tion")
|
||||
;; Test that env-vars are preserved.
|
||||
("lisp/c${CTTQ1}et/se-u" "lisp/c${CTTQ1}et/semantic-utest")
|
||||
("lisp/ced${CTTQ2}se-u" "lisp/ced${CTTQ2}semantic-utest")
|
||||
;; Test that env-vars don't prevent partial-completion.
|
||||
;; FIXME: Ideally we'd like to keep the ${CTTQ}!
|
||||
("lis/c${CTTQ1}/se-u" "lisp/cedet/semantic-utest")
|
||||
))
|
||||
(should (equal (completion-try-completion input
|
||||
#'completion--file-name-table
|
||||
nil (length input))
|
||||
(cons output (length output)))))))
|
||||
|
||||
(provide 'completion-tests)
|
||||
;;; completion-tests.el ends here
|
||||
|
|
|
|||
Loading…
Reference in a new issue