summaryrefslogtreecommitdiff
path: root/test/lisp/textmodes/css-mode-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Prefer pos-bol and pos-eol in testsStefan Kangas2022-08-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/calendar/todo-mode-tests.el (todo-test-toggle-item-header02, todo-test-edit-item-date-month) (todo-test-multiline-item-indentation-1) (todo-test-multiline-item-indentation-2) (todo-test-multiline-item-indentation-3): * test/lisp/cedet/semantic-utest-ia.el (semantic-ia-utest-buffer) (semantic-sr-utest-buffer-refs): * test/lisp/cedet/semantic-utest.el (semantic-utest-kill-indicator) (semantic-utest-unkill-indicator): * test/lisp/dired-tests.el (dired-test-bug27968): * test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--verify-single-and-multi-line): * test/lisp/emacs-lisp/find-func-tests.el (find-func-tests--find-library-verbose): * test/lisp/erc/erc-tests.el (erc-ring-previous-command) (erc-log-irc-protocol): * test/lisp/gnus/message-tests.el (message-mode-propertize): * test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): * test/lisp/mail/footnote-tests.el (footnote-tests-same-place): * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-completion-at-point): * test/lisp/progmodes/f90-tests.el (f90-test-bug38415): * test/lisp/progmodes/python-tests.el (python-indent-electric-comma-inside-multiline-string) (python-indent-electric-comma-after-multiline-string) (python-indent-electric-colon-1, python-indent-electric-colon-2) (python-indent-electric-colon-3, python-indent-electric-colon-4) (python-mark-defun-2, python-mark-defun-3, python-mark-defun-4) (python-mark-defun-5, python-nav-end-of-defun-2) (python-nav-end-of-statement-1, python-nav-end-of-block-1) (python-indent-dedent-line-backspace-2) (python-indent-dedent-line-backspace-3) (python-eldoc--get-symbol-at-point-1) (python-info-beginning-of-statement-p-1) (python-info-beginning-of-statement-p-2): * test/lisp/replace-tests.el (replace-occur-revert-bug32543) (replace-occur-revert-bug32987): * test/lisp/simple-tests.el (simple-delete-indentation-boundaries) (simple-delete-indentation-region) (line-number-at-pos-in-narrow-buffer) (line-number-at-pos-keeps-restriction): * test/lisp/textmodes/css-mode-tests.el (css-mode-test-selectors) (scss-mode-test-selectors): * test/lisp/textmodes/fill-tests.el (fill-test-unbreakable-paragraph) (fill-test-breakable-paragraph): * test/lisp/time-stamp-tests.el (time-stamp-custom-pattern): * test/src/lread-tests.el (lread-tests--last-message): * test/src/process-tests.el (set-process-filter-t): * test/src/undo-tests.el (undo-test-skip-invalidated-markers): Prefer pos-bol and pos-eol.
* Fix warning suppression in (S)CSS mode testsSimen Heggestøyl2022-05-151-2/+2
| | | | | * test/lisp/textmodes/css-mode-tests.el (css-mode-test-selectors) (scss-mode-test-selectors): Fix warning suppression.
* Don't freeze Emacs on colour codes in sccs-modeLars Ingebrigtsen2022-05-151-0/+69
| | | | | | * lisp/textmodes/css-mode.el (css--font-lock-keywords): Don't freeze Emacs on #ffffff #ffffff, and be more strict in parsing selectors (bug#53203).
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Update CSS completion testsDmitry Gutov2021-05-151-6/+6
| | | | | * test/lisp/textmodes/css-mode-tests.el (css-test-complete-pseudo-class) (css-test-complete-pseudo-element): Update the tests for recent changes.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Use new resource directory macros in tests (Bug#43792)Stefan Kangas2020-10-161-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/bookmark-tests.el (bookmark-tests-data-dir): * test/lisp/calendar/todo-mode-tests.el (todo-test-data-dir): * test/lisp/net/dbus-tests.el (dbus--tests-dir): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-sample-code-file): * test/lisp/emacs-lisp/package-tests.el (package-test-fake-contents-file): * test/lisp/emacs-lisp/shadow-tests.el (shadow-tests-data-directory): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-file-dir, testcover-tests-test-cases): * test/lisp/mail/uudecode-tests.el (uudecode-tests-data-dir): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-resource-directory): * test/lisp/pcmpl-linux-tests.el (pcmpl-linux-tests-data-dir): * test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-tests-data-directory): * test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory): * test/lisp/progmodes/ruby-mode-tests.el (ruby-mode-tests-data-dir): * test/lisp/saveplace-tests.el (saveplace-tests-dir): * test/lisp/textmodes/css-mode-tests.el (css-mode-tests-data-dir): Remove. * test/lisp/bookmark-tests.el (bookmark-tests-bookmark-file) (bookmark-tests-example-file, bookmark-tests-bookmark-file-list): * test/lisp/calendar/todo-mode-tests.el (todo-test-file-1) (todo-test-archive-1, with-todo-test, todo-test--add-file): * test/lisp/custom-tests.el (custom--test-theme-variables): * test/lisp/net/dbus-tests.el (dbus--test-introspect): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-setup-code-file): * test/lisp/emacs-lisp/package-tests.el (package-test-data-dir) (package-test-desc-from-buffer, package-test-install-single) (package-test-macro-compilation) (package-test-install-prioritized) (package-test-install-multifile, package-test-update-archives) (package-test-update-archives-async) (package-test-update-archives/ignore-nil-entry) (package-test-signed, package-x-test-upload-buffer) (package-x-test-upload-new-version): * test/lisp/emacs-lisp/shadow-tests.el (shadow-case-insensitive): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-build-test-cases): * test/lisp/mail/uudecode-tests.el (uudecode-tests-encoded-str) (uudecode-tests-decoded-str): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-file-archive) (tramp-archive-test-directory): * test/lisp/pcmpl-linux-tests.el (pcmpl-linux-test-fs-types) (pcmpl-linux-test-mounted-directories): * test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-bug-10483) (cperl-mode-test-indent-styles): * test/lisp/progmodes/flymake-tests.el (flymake-tests--call-with-fixture): * test/lisp/progmodes/ruby-mode-tests.el (ruby--indent/converted-from-manual-test): * test/lisp/saveplace-tests.el (saveplace-test-save-place-to-alist/dir) (saveplace-test-load-alist-from-file): * test/lisp/textmodes/css-mode-tests.el (css-mode-test-indent): Adjust to use new resource directory macros.
* Remove TODO to convert files to unit testsStefan Kangas2020-09-231-2/+0
| | | | | | | * test/lisp/textmodes/css-mode-tests.el: * test/lisp/progmodes/ruby-mode-tests.el: Remove TODO to convert test files into unit tests. The files are still useful for debugging. Ref: https://lists.gnu.org/r/emacs-devel/2020-09/msg01906.html
* ; * test/lisp/textmodes/css-mode-tests.el: Add TODO.Stefan Kangas2020-09-211-0/+2
|
* Convert indent test for css-mode into automatic testStefan Kangas2020-09-101-0/+14
| | | | | | | | * test/lisp/textmodes/css-mode-tests.el (css-mode-test-indent): New test. (css-mode-tests-data-dir): New variable. * test/manual/indent/css-mode.css: Move from here... * test/lisp/textmodes/css-mode-resources/test-indent.css: ...to here.
* ; Fix license statements.Stefan Kangas2020-08-271-3/+5
|
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Add Imenu support to CSS mode and its derivativesSimen Heggestøyl2018-05-291-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/css-mode.el (css--join-nested-selectors) (css--prev-index-position, css--extract-index-name): New helper functions for supporting Imenu. (css-mode): Set `imenu-space-replacement', `imenu-prev-index-position-function', and `imenu-extract-index-name-function'. (css-current-defun-name): Reuse `css--prev-index-position' and `css--extract-index-name' to support nested selectors. * test/lisp/textmodes/css-mode-tests.el (css-test-current-defun-name): Fix character index. (css-test-join-nested-selectors): New tests for `css--join-nested-selectors'. * etc/NEWS: Add news entry.
* | Merge from origin/emacs-26Glenn Morris2018-02-091-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0276743 (origin/emacs-26) Doc string fix in latin-alt.el c9269af Minor improvements in package.texi 898a3e4 Minor improvement in Emacs user manual 8f7d718 * doc/lispref/anti.texi (Antinews): Replace 25.2 with 25.3. 989d0af Improve documentation of mini-window resizing 923e415 More changes in the Emacs manual 565adf2 Clarify that text-quoting-style doesn't affect *Info* (Bug#24... 2dd273b Mention that shell quoting of % on w32 may fail (Bug#19350) 19fa6d5 Fix --no-build-details for w32 and macOS 979944c * doc/lispref/anti.texi (Antinews): Add some more antinews. c2727e3 Fix crashes when run with --no-build-details dc08490 More changes for the manual 04c5bd5 Doc fixes for process functions (Bug#30349) e209034 Fix shr and CSS 4 color maps 5fe8192 Yet another round of improvements in the manual Conflicts: doc/emacs/files.texi test/lisp/subr-tests.el
| * Fix shr and CSS 4 color mapsBasil L. Contovounesios2018-02-071-1/+1
| | | | | | | | | | | | | | | | | | * lisp/net/shr-color.el (shr-color-html-colors-alist): Fix typos. Add RebeccaPurple. * lisp/textmodes/css-mode.el (css--color-map): Add fuchsia-magenta and aqua-cyan aliases. * test/lisp/textmodes/css-mode-tests.el (css-test-property-values): Bump color count.
* | Shorten CSS hex colors when possibleSimen Heggestøyl2018-01-281-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/css-mode.el (css--format-hex): New function for shortening CSS hex colors when possible. (css--named-color-to-hex, css--rgb-to-named-color-or-hex): Use it. * test/lisp/textmodes/css-mode-tests.el (css-test-format-hex): New tests for 'css--format-hex'. (css-test-named-color-to-hex, css-test-cycle-color-format): Adjust for the changes to 'css--named-color-to-hex' and 'css--rgb-to-named-color-or-hex'.
* | Fix off-by-one error in 'css--hex-to-rgb'Simen Heggestøyl2018-01-281-1/+3
| | | | | | | | | | | | | | * lisp/textmodes/css-mode.el (css--hex-to-rgb): Fix off-by-one error. * test/lisp/textmodes/css-mode-tests.el (css-test-hex-to-rgb): Add regression tests for the above fix.
* | Parse percent values in CSS alpha componentsSimen Heggestøyl2018-01-211-7/+9
| | | | | | | | | | | | | | | | | | * lisp/textmodes/css-mode.el (css--rgb-color): Support parsing percent values in the alpha component. * test/lisp/textmodes/css-mode-tests.el (css-test-rgb-to-named-color-or-hex, css-test-rgb-parser): Update for the above changes.
* | Merge from origin/emacs-26Paul Eggert2018-01-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63b04c11d5 Fix copyright years by hand 5c7dd8a783 Update copyright year to 2018 220a9ecba1 Merge from Gnulib 312c565566 Don't add empty keyboard macro to macro ring (Bug#24992) 39ca289a7a Allow customization of decoding of "man" command f8240815ea * etc/NEWS: Add security consideration note on passphrase ... 0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ... acd289c5a4 Fix problems with indexing in User manual b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh... e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846 81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ... 7175496d7a Fix doc string of 'enable-recursive-minibuffers' 5b38406491 Fix documentation of delsel and of killing text # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex
| * Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | Add command for cycling between CSS color formatsSimen Heggestøyl2017-12-171-0/+73
|/ | | | | | | | | | | | | | | | | | | * lisp/textmodes/css-mode.el (css-mode-map): Add keybinding for 'css-cycle-color-format'. (css--rgb-color): Add support for extracting alpha component. (css--hex-alpha, css--color-to-4-dpc, css--named-color-to-hex) (css--format-rgba-alpha, css--hex-to-rgb) (css--rgb-to-named-color-or-hex): New functions. (css-cycle-color-format): New command for cycling between color formats. * test/lisp/textmodes/css-mode-tests.el (css-test-color-to-4-dpc): (css-test-named-color-to-hex, css-test-format-rgba-alpha) (css-test-hex-to-rgb, css-test-rgb-to-named-color-or-hex) (css-test-cycle-color-format, css-test-hex-alpha): New tests for the changes mentioned above. * etc/NEWS: Mention the new command.
* Fix off-by-one error in 'css--hex-color'Simen Heggestøyl2017-12-161-0/+6
| | | | | | | * lisp/textmodes/css-mode.el (css--hex-color): Fix off-by-one error. * test/lisp/textmodes/css-mode-tests.el (css-test-hex-color): New test for 'css--hex-color'.
* Add tests for `css-current-defun-name'Simen Heggestøyl2017-09-281-0/+21
| | | | | | | * test/lisp/textmodes/css-mode-tests.el (css-test-current-defun-name) (css-test-current-defun-name-nested) (css-test-current-defun-name-complex): New tests for `css-current-defun-name'.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Complete CSS property values less eagerly (Bug#27392)Simen Heggestøyl2017-06-171-1/+6
| | | | | | | | | | * lisp/textmodes/css-mode.el (css--complete-property-value): Be less eager by looking for a colon after the property which values are being completed for. * test/lisp/textmodes/css-mode-tests.el (css-test-complete-property): Add a test case ensuring that properties that are prefixes of other properties don't hinder further completion.
* Add color highlighting to css-modeTom Tromey2017-05-031-1/+45
| | | | | | | | | | | | | | | | | | | | | | | Bug#25525 * lisp/textmodes/css-mode.el (css--color-map): New constant. (css-value-class-alist): Use css--color-map. (css--number-regexp, css--percent-regexp) (css--number-or-percent-regexp, css--angle-regexp): New constants. (css--color-skip-blanks, css--rgb-color, css--hsl-color): New functions. (css--colors-regexp): New constant. (css--hex-color, css--named-color, css--compute-color) (css--contrasty-color, css--fontify-colors) (css--fontify-region): New functions. (css-mode): Set font-lock-fontify-region-function. (css-mode-syntax-table): Set syntax on more characters. (css-fontify-colors): New defcustom. (scss-mode-syntax-table): Define syntax for ?$ and ?%. * test/lisp/textmodes/css-mode-tests.el (css-test-property-values): Update. (css-test-rgb-parser, css-test-hsl-parser) (css-test-named-color): New tests. * etc/NEWS: Add entry.
* 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.