summaryrefslogtreecommitdiff
path: root/test/lisp/textmodes/css-mode-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug in css--mdn-find-symbolTom Tromey2017-02-111-1/+2
| | | | | | | * lisp/textmodes/css-mode.el (css--mdn-find-symbol): Skip whitespace before skipping word characters. test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): Add regression test.
* css-mode documentation lookup featureTom Tromey2017-01-301-0/+15
| | | | | | | | | | | | * etc/NEWS: Mention new feature. * lisp/textmodes/css-mode.el (css-mode-map): New defvar. (css--mdn-lookup-history): New defvar. (css-lookup-url-format): New defcustom. (css--mdn-property-regexp, css--mdn-completion-list): New defconsts. (css--mdn-after-render, css--mdn-find-symbol, css-lookup-symbol): New defuns. * test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): New test.
* Update copyright year to 2017 in masterPaul Eggert2017-01-011-1/+1
| | | | | | Run admin/update-copyright in the master branch. This fixes files that were not already fixed in the emacs-25 branch before it was merged here.
* Add tests for foreign completions in CSS modeSimen Heggestøyl2016-10-151-1/+35
| | | | | | | | | | | * test/lisp/textmodes/css-mode-tests.el (css-test-foreign-completions): New test for `css--foreign-completions'. (css-test-complete-selector-tag): Rename test. (css-test-complete-selector-class): New test testing completion of class names in selectors. (css-test-complete-selector-id): New test testing completion of IDs in selectors.
* Complete "initial" and "unset" in CSS modeSimen Heggestøyl2016-07-061-1/+2
| | | | | | | | | | * lisp/textmodes/css-mode.el (css--complete-property-value): Make "initial" and "unset" completion candidates for all CSS properties, just like "inherit". * test/lisp/textmodes/css-mode-tests.el (css-test-complete-property-value): Update test to reflect the above change.
* Add completion of colors in CSS modeEtienne Prud’homme2016-05-221-1/+1
| | | | | | | | * lisp/textmodes/css-mode.el (css-value-class-alist): Add CSS colors from "CSS Color Module Level 3". * test/lisp/textmodes/css-mode-tests.el (css-test-property-values): Update test.
* Add tests for CSS mode completionSimen Heggestøyl2016-05-071-10/+114
| | | | | | | | | | | | | | * test/lisp/textmodes/css-mode-tests.el (css-test-property-values) (css-test-property-values-no-duplicates) (css-test-value-class-lookup): Use `seq-sort'. (css-mode-tests--completions): New helper function for retrieving CSS completions. (css-test-complete-bang-rule, scss-test-complete-bang-rule) (css-test-complete-property-value, css-test-complete-pseudo-class) (css-test-complete-pseudo-element, css-test-complete-at-rule) (scss-test-complete-at-rule, css-test-complete-property) (css-test-complete-selector, css-test-complete-nested-selector) (scss-test-complete-nested-selector): New tests.
* Add completion of `calc()' in CSS modeSimen Heggestøyl2016-04-261-2/+2
| | | | | | | | | | * lisp/textmodes/css-mode.el (css-value-class-alist): Add `calc()' as a completion candidate for several value classes. (css--value-class-lookup): Return only unique results. * test/lisp/textmodes/css-mode-tests.el (css-test-property-values-no-duplicates) (css-test-value-class-lookup): Update to reflect the above changes.
* Don't let `css--property-values' return duplicatesSimen Heggestøyl2016-04-241-4/+14
| | | | | | | | | | * lisp/textmodes/css-mode.el (css--property-values): Don't return duplicate values. * test/lisp/textmodes/css-mode-tests.el (css-test-property-values): Take the above into account. (css-test-property-values-no-duplicates): Test that duplicates aren't returned by `css--property-values'.
* Cache results of `css--property-values'Simen Heggestøyl2016-04-241-0/+7
| | | | | | | | * lisp/textmodes/css-mode.el (css--property-values): Cache computed values. * test/lisp/textmodes/css-mode-tests.el (css-test-property-value-cache): New regression test for the above.
* Support completion of attribute values in CSS modeSimen Heggestøyl2016-03-231-0/+66
* lisp/textmodes/css-mode.el (css-property-alist): New defconst holding CSS identifiers and the values they can have. (css-property-ids): Compute dynamically from `css-property-alist'. (css-value-class-alist): New defconst holding property value classes and their values. (css--property-value-cache): New variable providing a cache for `css--property-values'. (css--value-class-lookup): New function for computing a list of values in a value class. (css--property-values): New function for computing a list of possible values for a CSS property. (css--complete-property-value): New function for completing a property value. (css-completion-at-point): Add support for completing property values. * test/lisp/textmodes/css-mode-tests.el: New file.