summaryrefslogtreecommitdiff
path: root/test/lisp/calendar
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-029-9/+9
|
* Mark failing icalendar test as unstable (bug#56241)Mattias Engdegård2023-07-071-0/+3
| | | | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar-export-bug-56241-dotted-pair): This test started failing early July 2023 in multiple branches at once without any change to the code and is likely sensitive to the current date. Tag it to keep it quiet for now.
* Use 'calendar-buffer' instead of fixed stringThuna2023-05-021-1/+1
| | | | | | | | * test/lisp/calendar/cal-julian-tests.el (with-cal-julian-test): Use 'calendar-buffer' instead of a literal fixed name. (Bug#61546) Copyright-paperwork-exempt: yes
* Fix spurious display of eclipses in CalendarUlrich Müller2023-02-131-12/+15
| | | | | | | * lisp/calendar/lunar.el (eclipse-check): Don't show an eclipse unless the phase is new moon or full moon. (bug#61460) * test/lisp/calendar/lunar-tests.el (lunar-test-eclipse-check) (lunar-test-phase-list): Update tests.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-019-9/+9
|
* Delete temp files after icalendar testsStefan Kangas2022-12-141-1/+2
| | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar-tests--get-error-string-for-export): Make sure we clean up temporary files after test.
* icalendar: Adjust tests after fixing parsing of sexp entries (bug#56241)Ulf Jasper2022-11-241-15/+18
| | | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar-export-bug-56241-nested-sexps): New. * test/lisp/calendar/icalendar-tests.el (icalendar-real-world): Disable testcase for exporting sexp entries that has now become invalid.
* icalendar.el: Add test(s) for bug#56241Ulf Jasper2022-11-231-0/+43
| | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar-tests--get-error-string-for-export): new. * icalendar-tests.el (icalendar-export-bug-56241-dotted-pair): new
* ; Prefer HTTPS to HTTP in many URLsStefan Kangas2022-10-151-1/+1
|
* Prefer pos-bol and pos-eol in testsStefan Kangas2022-08-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Merge from origin/emacs-28Stefan Kangas2022-07-171-2/+2
|\ | | | | | | | | f5218385c0 Fix obsoletion of nntp-authinfo-file 10b6919870 ; Fix typos
| * ; Fix typosStefan Kangas2022-07-161-2/+2
| |
* | icalendar-tests no longer assumes TZ = wallPaul Eggert2022-06-151-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | Do not assume that the TZ environment variable is either unset or agrees with /etc/localtime. I ran into this test bug while running ‘TZ=America/Chicago make check’ on a platform where /etc/localtime was America/Los_Angeles. * test/lisp/calendar/icalendar-tests.el: (icalendar-tests--decode-isodatetime): Don’t use set-time-zone-rule, whose doc string says “Instead of calling this function, you typically want something else” for a reason. Instead, pass the zone arg to icalendar-test--format.
* | ISO 8601 strings sans "Z" don’t specify DST flagPaul Eggert2022-05-291-10/+10
| | | | | | | | | | | | | | | | * lisp/calendar/iso8601.el (iso8601--zone-dst): New function. (iso8601-parse, iso8601-parse-time): Use it. (iso8601--decoded-time): Default dst to -1, not nil. * test/lisp/calendar/iso8601-tests.el (test-iso8601-combined) (standard-test-time-of-day-zone): Adjust to new behavior.
* | Make list-times not include zero elementsLars Ingebrigtsen2022-04-131-2/+7
| | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Time Parsing): Mention %x. * lisp/calendar/time-date.el (format-seconds): Accept a new %x spec that removes trailing zeros (bug#54904). * lisp/emacs-lisp/timer-list.el (list-timers): Don't display trailing zero bits.
* | Revert todo-mode tests failing after todo-mode reversionLars Ingebrigtsen2022-03-221-5/+5
| |
* | Rewrite hl-line-modedickmao2022-03-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fashion of dual global and minor modes, each managing a replica of state, has long been outmoded by globalized minor modes (nee easy-mmode-define-global-mode) around the turn of the century. * lisp/calendar/todo-mode.el (todo-toggle-item-highlighting, todo-hl-line-range, todo-modes-set-2): Adapt to new hl-line-highlight-hook. * lisp/hl-line.el (hl-line-overlay): Rename hl-line--overlay. (global-hl-line-overlay, global-hl-line-overlays, global-hl-line-sticky-flag, hl-line-overlay-buffer, hl-line-range-function): Obsolesce. (hl-line--overlay): Erstwhile hl-line-overlay. (hl-line, hl-line-face): Consolidate. (hl-line-sticky-flag): Say less (Gen Z Hospital). (hl-line-overlay-priority): Make this a custom. (hl-line-highlight-hook): Prefer hook over specialized hl-line-range-function. (hl-line-mode): Say less (Gen Z Hospital). (hl-line-make-overlay): Remove (hl-line-highlight, hl-line-unhighlight): Rewrite. (hl-line-maybe-unhighlight): Remove. (hl-line-turn-on): Necessary for globalized minor mode. (global-hl-line-mode, global-hl-line-highlight, global-hl-line-highlight-all, global-hl-line-unhighlight, global-hl-line-maybe-unhighlight, global-hl-line-unhighlight-all): Prefer globalized minor mode. (hl-line-move, hl-line-unload-function): Remove. * test/lisp/calendar/todo-mode-tests.el (todo-test-item-highlighting, todo-test-done-items-separator06-bol, todo-test-done-items-separator06-eol, todo-test-done-items-separator07): Adapt to consolidated face.
* | Merge from origin/emacs-28Eli Zaretskii2022-01-019-9/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-019-9/+9
| |
* | Use time-equal-p to compare timestamps in testsPaul Eggert2021-12-051-8/+9
| | | | | | | | | | | | * test/lisp/calendar/time-date-tests.el (test-days-to-time) (test-time-since): Use time-equal-p to compare timestamps, since the default form shouldn’t matter.
* | Fix (date-to-time "2021-12-04")Paul Eggert2021-12-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should complete the fix for Bug#52209. * lisp/calendar/time-date.el (date-to-time): Apply decoded-time-set-defaults only to the output of (parse-time-string date), and only when the output has a year (to avoid confusion when dates lack years). There is no point applying it after timezone-make-date-arpa-standard since the latter fills in all the blanks. And the former code mistakenly called encode-time on an already-encoded time. This goes back to the code a couple of days ago, except with changed behavior (to fix Bug#52209) only when timezone-make-date-arpa-standard is not called. * test/lisp/calendar/time-date-tests.el (test-date-to-time) (test-days-between): New tests.
* | Fix icalendar time zone parsingdickmao2021-11-211-15/+19
| | | | | | | | | | | | | | | | * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): Parse time zones more correctly. * test/lisp/calendar/icalendar-tests.el (icalendar-tests--decode-isodatetime): Fix tests so that they work in other time zones than Europe/Berlin (bug#51959).
* | Turn mistaken functions into tests (bug#51941)Mattias Engdegård2021-11-181-1/+1
| | | | | | | | | | | | | | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar-tests--decode-isodatetime): * test/src/eval-tests.el (eval-tests-19790-backquote-comma-dot-substitution): Change `defun` into `ert-deftest` where this seems to have been the original intention.
* | Prefer ert-with-temp-(directory|file) in most remaining testsStefan Kangas2021-11-081-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/auth-source-tests.el (auth-source-test-searches): * test/lisp/autorevert-tests.el (auto-revert-test00-auto-revert-mode) (auto-revert-test01-auto-revert-several-files) (auto-revert-test02-auto-revert-deleted-file) (auto-revert-test03-auto-revert-tail-mode) (auto-revert-test04-auto-revert-mode-dired) (auto-revert-test05-global-notify) (auto-revert-test06-write-file) (auto-revert-test07-auto-revert-several-buffers): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-cycle): * test/lisp/custom-tests.el (custom-theme--load-path): * test/lisp/dired-aux-tests.el (dired-test-bug27496) (with-dired-bug28834-test): * test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load) (bytecomp-tests--dest-mountpoint) (bytecomp-tests--target-file-no-directory): * test/lisp/emacs-lisp/gv-tests.el (gv-tests--in-temp-dir): * test/lisp/eshell/eshell-tests.el (with-temp-eshell) (eshell-test-command-result): * test/lisp/info-xref-tests.el (info-xref-test-makeinfo): * test/lisp/vc/vc-tests.el (vc-test--create-repo) (vc-test--register, vc-test--state, vc-test--working-revision) (vc-test--checkout-model, vc-test--rename-file) (vc-test--version-diff): * test/src/buffer-tests.el (test-kill-buffer-auto-save-delete): * test/src/comp-tests.el (comp-tests-bootstrap): * test/src/process-tests.el (process-test-quoted-batfile): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly.
* | Prefer ert-with-temp-(directory|file)Stefan Kangas2021-11-072-44/+43
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/abbrev-tests.el (read-write-abbrev-file-test) (read-write-abbrev-file-test-with-props) (abbrev-edit-save-to-file-test): * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret) (auth-source-delete): * test/lisp/autoinsert-tests.el (autoinsert-tests-auto-insert-file): * test/lisp/bookmark-tests.el (with-bookmark-test-save-load): * test/lisp/buff-menu-tests.el (buff-menu-24962): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-export): * test/lisp/calendar/todo-mode-tests.el (with-todo-test): * test/lisp/dired-tests.el (dired-test-bug27243-01, dired-test-bug27243-02) (dired-test-bug27243-03, dired-test-bug27631) (dired-test-bug27968, dired-test-with-temp-dirs): * test/lisp/dired-x-tests.el (dired-test-bug25942): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-scan) (check-declare-tests-verify-mismatch): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env): * test/lisp/emacs-lisp/package-tests.el (with-package-test) (package-test-signed): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-markup-region) (testcover-tests-run-test-case): * test/lisp/emulation/viper-tests.el (viper-test-undo-kmacro): * test/lisp/epg-tests.el (with-epg-tests): * test/lisp/eshell/em-hist-tests.el (eshell-write-readonly-history): * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631): * test/lisp/ffap-tests.el (ffap-tests-25243): * test/lisp/files-tests.el (files-tests-bug-18141) (files-tests-read-file-in-~, files-tests-make-directory) (files-tests-copy-directory, files-tests-executable-find) (files-tests-dont-rewrite-precious-files) (files-tests--save-some-buffers): * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27631): * test/lisp/mail/uudecode-tests.el (uudecode-tests-decode-region-internal) (uudecode-tests-decode-region-external): * test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file): * test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive): * test/lisp/progmodes/etags-tests.el (etags-buffer-local-tags-table-list): * test/lisp/progmodes/flymake-tests.el (ruby-backend): * test/lisp/progmodes/python-tests.el (python-tests-with-temp-file): * test/lisp/progmodes/sql-tests.el (with-sql-test-connect-harness): * test/lisp/saveplace-tests.el (saveplace-test-save-place-to-alist/file) (saveplace-test-forget-unreadable-files) (saveplace-test-place-alist-to-file): * test/lisp/so-long-tests/spelling-tests.el: * test/lisp/textmodes/reftex-tests.el (reftex-locate-bibliography-files) (reftex-parse-from-file-test): * test/lisp/thumbs-tests.el (thumbs-tests-thumbsdir/create-if-missing): * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads): * test/lisp/vc/diff-mode-tests.el (diff-mode-test-ignore-trailing-dashes): * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): * test/lisp/wdired-tests.el (wdired-test-bug32173-01) (wdired-test-bug32173-02, wdired-test-symlink-name) (wdired-test-unfinished-edit-01, wdired-test-bug34915) (wdired-test-bug39280): * test/src/buffer-tests.el (test-kill-buffer-auto-save-default): * test/src/filelock-tests.el (filelock-tests--fixture): * test/src/inotify-tests.el (inotify-file-watch-simple): * test/src/undo-tests.el (undo-test-file-modified): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly. In some cases, this is just cleanup, but in several cases this fixes bugs where an error would have lead to us not cleaning up.
* Fix todo-mode AOT test failures (bug#51308)Lars Ingebrigtsen2021-10-211-1/+1
|
* ; Minor stylistic checkdoc fixes in test/**/*.elStefan Kangas2021-09-264-2/+7
|
* Add diary-offset to diary-lib.elYuchen Pei2021-09-041-0/+7
| | | | | | * doc/emacs/calendar.texi: Document the change. * lisp/calendar/diary-lib.el (diary-offset): * test/lisp/calendar/icalendar-tests.el: Add a test (bug#50195).
* Add more support for the French Revolutionary CalendarJean Forget2021-07-231-0/+113
| | | | | | | | | | | * lisp/calendar/cal-french.el (calendar-french-feasts-array): New variable (bug#19174). (calendar-french-trim-feast): New function. (calendar-french-date-string, calendar-french-goto-date): (calendar-french-goto-date): Use them. http://datetime.mongueurs.net/Histoire/s-c/01-g.en.html https://metacpan.org/pod/DateTime::Calendar::FrenchRevolutionary#Internet
* Get fractional seconds in iso8601 parsing rightLars Ingebrigtsen2021-06-141-1/+9
| | | | | | * lisp/calendar/iso8601.el (iso8601-parse-time): Get fractional times (with leading zeroes in the fraction part) right (bug#49017). Fix based on a patch by "J.P." <jp@neverwas.me>.
* ; Normalize and add missing first and last linesStefan Kangas2021-04-192-2/+2
|
* Display yearly ical events from first year on. Fix Bug#23100.Ulf Jasper2021-02-157-56/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert yearly rrule starting in year x into diary-anniversary entry for year x-1 when importing an icalendar. Correspondingly convert diary-anniversary for year x into yearly rrule starting in year x+1. * test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-american: * test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-european: * test/lisp/calendar/icalendar-resources/import-rrule-anniversary.diary-iso: * test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-american: * test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-european: * test/lisp/calendar/icalendar-resources/import-rrule-yearly.diary-iso: * test/lisp/calendar/icalendar-tests.el (icalendar-convert-anniversary-to-ical): Match new diary-anniversary/yearly-rrule behaviour. * lisp/calendar/icalendar.el (icalendar--datestring-to-isodate): Add year-shift option. (icalendar--convert-anniversary-to-ical): Shift the year as diary-anniversary is not displayed in the initial year. (icalendar--convert-recurring-to-diary): Shift the year as diary-anniversary is not displayed in the initial year. (Bug#23100)
* Stabilise lunar-phase-list test (bug#45818)Mattias Engdegård2021-01-131-20/+18
| | | | | | | | | | | | | The test reference data was produced with accidental interference from the system daylight saving in effect at the time. Prevent that from occurring again and correct the data. * test/lisp/calendar/lunar-tests.el (with-lunar-test): Switch to UTC and make sure daylight saving adjustment is disabled. Use normal time presentation for maintainability. * test/lisp/calendar/lunar-tests.el (lunar-test-phase): Adjust to UTC. (lunar-test-phase-list): Adjust to UTC with correct times. Enable the test by removing its :unstable mark.
* Fix Indian time zone test when run by Irishmen (bug#45818)Mattias Engdegård2021-01-121-1/+3
| | | | | | | | | * test/lisp/calendar/solar-tests.el (solar-sunrise-sunset): Inhibit any attempt by confused calendar code to apply daylight saving correction when Irish time zone settings are in effect. It's not entirely clear why this is needed but may be related to the fact that 'IST' stands for both Irish and Indian Standard Time, and that Ireland uses reversed daylight saving in winter.
* Update copyright year to 2021Paul Eggert2021-01-018-8/+8
| | | | Run "TZ=UTC0 admin/update-copyright".
* `format-time' can now do sub-second timesLars Ingebrigtsen2020-10-301-1/+8
| | | | | | | * doc/lispref/os.texi (Time Parsing): Document it. * lisp/calendar/time-date.el (format-seconds): Allow formatting sub-second times.
* Fix sunrise and sunset calculation (bug#44237)Mattias Engdegård2020-10-271-0/+42
| | | | | | | * lisp/calendar/solar.el (solar-moment): Use initial values for binary search that won't end the loop prematurely and yield incorrect answers. * test/lisp/calendar/solar-tests.el: New file.
* Move icalendar test data to test/lisp/calendar/icalendar-resourcesUlf Jasper2020-10-23142-7/+1110
| | | | | | | | | | * test/lisp/calendar/icalendar-tests.el (ert-x): Required for 'ert-resource-file'. (icalendar-tests--data-dir): Removed. (icalendar-tests--get-file-contents): Use 'ert-resource-file' for finding test data files. * test/data/icalendar/*: Moved to test/lisp/calendar/icalendar-resources/. * test/lisp/calendar/icalendar-resources/*: Moved from test/data/icalendar.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into masterUlf Jasper2020-10-221-1/+51
|\
| * Use lexical-binding in time-date.el and expand testsStefan Kangas2020-10-221-1/+51
| | | | | | | | | | | | | | | | | | | | * lisp/calendar/time-date.el: Use lexical-binding. * test/lisp/calendar/time-date-tests.el (test-obsolete-with-decoded-time-value) (test-obsolete-encode-time-value, test-format-seconds) (test-days-to-time, test-seconds-to-string): New tests. (test-days-in-month, test-time-since, test-time-decoded-period): Expand test with a few more values.
* | Move test data for icalendar tests to separate files.Ulf Jasper2020-10-221-1037/+190
|/ | | | | | | | | | | | | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar-tests--data-dir, icalendar-tests--get-file-contents): New. (icalendar-tests--test-import, icalendar-tests--do-test-import): Read input and expected results from files. (icalendar-import-non-recurring, icalendar-import-rrule) (icalendar-import-duration, icalendar-import-bug-6766) (icalendar-import-bug-24199, icalendar-import-bug-33277) (icalendar-import-multiple-vcalendars, icalendar-import-with-uid) (icalendar-import-with-timezone, icalendar-real-world): Move test data (input and expected result) to separate files. * test/calendar/icalendar/* New files containing test data for icalendar tests.
* Use new resource directory macros in tests (Bug#43792)Stefan Kangas2020-10-161-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Apply icalendar.el patch by Thomas Plass <thunk2@arcor.de>. Fix bug#34315.Ulf Jasper2020-09-021-9/+9
| | | | | | | | | | | | * lisp/calendar/icalendar.el (icalendar--convert-tz-offset): No DST when RDATE is present. * lisp/calendar/icalendar.el (icalendar--parse-vtimezone): Use `icalendar--get-most-recent-observance'. * (icalendar--get-most-recent-observance): New. * (icalendar--decode-isodatetime): Add parameters source-zone, result-zone. * (icalendar--decode-isoduration): Fix decoding days. * test/lisp/calendar/icalendar-tests.el (icalendar--decode-isoduration): Add testcases.
* Add unit tests for icalendar.elUlf Jasper2020-09-021-4/+126
| | | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar--parse-vtimezone, icalendar--decode-isodatetime): Add testcases. * test/lisp/calendar/icalendar-tests.el (icalendar--convert-tz-offset, icalendar--decode-isoduration): New.
* Prevent spurious tabs by RET in todo-edit-mode (bug#43068)Stephen Berman2020-08-272-7/+56
| | | | | | | | | | | | | | | | | | | | * lisp/calendar/todo-mode.el (todo-key-bindings-t) (todo-edit-mode-map): Remove remapping of `newline' to `newline-and-indent'. (todo-modes-set-1): Remove local setting of `indent-line-function'. (todo-edit-mode): Locally set `indent-line-function' to `todo-indent'. * test/lisp/calendar/todo-mode-tests.el (todo-test-move-item05): Prevent interactive test failure. (Until the addition of testcat4 to todo-test-1.todo, the test passed by chance, since testcat3 is empty and has no archived items.) (todo-test-edit-item-date-month): Refer to bug number. (todo-test-multiline-item-indentation-1) (todo-test-multiline-item-indentation-2) (todo-test-multiline-item-indentation-3): New tests. * test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Remove spurious tabs from testcat1.
* Fix several todo-mode.el editing bugs (bug#42976)Stephen Berman2020-08-212-1/+51
| | | | | | | | | | | | | | | | | | | * lisp/calendar/todo-mode.el (todo-insert-item--basic): Ensure the target todo file is in todo-mode. (todo-edit-item--text): When editing a done item comment, prevent clobbering match data on finishing the edit. (todo-edit-item--header): Ensure that decrementing the month of the date header works for intervals greater than a year, and when incrementing or decrementing the month crosses one or more years, adjust the year as needed. (todo-read-category): If we're outside of todo-mode and there is a current todo file, use it; otherwise, use the default todo file. * test/lisp/calendar/todo-mode-tests.el (todo-test-edit-item-date-month): New test. * test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Modify to accommodate new test.
* Fix off-by-one error in decoded-time-add (with months)Lars Ingebrigtsen2020-08-211-0/+20
| | | | | * lisp/calendar/time-date.el (decoded-time-add): Fix month addition, which was off-by-one.
* Add new function decoded-time-periodLars Ingebrigtsen2020-08-051-0/+14
| | | | * lisp/calendar/time-date.el (decoded-time-period): New function.
* Tag a test as unstableGlenn Morris2020-06-131-0/+5
| | | | | * test/lisp/calendar/lunar-tests.el (lunar-test-phase-list): Mark as unstable. Eg fails on hydra.nixos.org.
* Use lexical-binding in lunar.el and add testsStefan Kangas2020-06-071-0/+70
| | | | | | * lisp/calendar/lunar.el: Use lexical-binding. (lunar-phases, diary-lunar-phases): Silence byte-compiler. * test/lisp/calendar/lunar-tests.el: New file.