diff options
| author | Ulf Jasper | 2014-07-26 14:53:36 +0200 |
|---|---|---|
| committer | Ulf Jasper | 2014-07-26 14:53:36 +0200 |
| commit | 54e3f15626296c1ece932852df2b3d4938b0b44a (patch) | |
| tree | 34a4e8b895046212753486b58a2b812cb3bec9ec /test | |
| parent | 6ea4c765a0d1dd2d5b4c50fdc2b182818e43872a (diff) | |
| download | emacs-54e3f15626296c1ece932852df2b3d4938b0b44a.tar.gz emacs-54e3f15626296c1ece932852df2b3d4938b0b44a.zip | |
Work around the failures in icalendar-tests which occasionally occur
on hydra.nixos.org.
* automated/icalendar-tests.el (icalendar-tests--do-test-import):
Work around the failures in icalendar-tests which occasionally occur on
hydra.nixos.org.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 6 | ||||
| -rw-r--r-- | test/automated/icalendar-tests.el | 25 |
2 files changed, 30 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index c66ea1c739f..6afa9ea8959 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-07-26 Ulf Jasper <ulf.jasper@web.de> | ||
| 2 | |||
| 3 | * automated/icalendar-tests.el (icalendar-tests--do-test-import): | ||
| 4 | Work around the failures in icalendar-tests which occasionally occur on | ||
| 5 | hydra.nixos.org. | ||
| 6 | |||
| 1 | 2014-07-21 Fabián Ezequiel Gallina <fgallina@gnu.org> | 7 | 2014-07-21 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 8 | ||
| 3 | * automated/python-tests.el: | 9 | * automated/python-tests.el: |
diff --git a/test/automated/icalendar-tests.el b/test/automated/icalendar-tests.el index b921853c4aa..7b51f907d38 100644 --- a/test/automated/icalendar-tests.el +++ b/test/automated/icalendar-tests.el | |||
| @@ -718,11 +718,34 @@ Argument EXPECTED-AMERICAN expected american style diary string." | |||
| 718 | Argument INPUT input icalendar string. | 718 | Argument INPUT input icalendar string. |
| 719 | Argument EXPECTED-OUTPUT expected diary string." | 719 | Argument EXPECTED-OUTPUT expected diary string." |
| 720 | (let ((temp-file (make-temp-file "icalendar-test-diary"))) | 720 | (let ((temp-file (make-temp-file "icalendar-test-diary"))) |
| 721 | ;; Test the Catch-the-mysterious-coding-header logic below. | ||
| 722 | ;; Ruby-mode adds an after-save-hook which inserts the header! | ||
| 723 | ;; (save-excursion | ||
| 724 | ;; (find-file temp-file) | ||
| 725 | ;; (ruby-mode)) | ||
| 721 | (icalendar-import-buffer temp-file t t) | 726 | (icalendar-import-buffer temp-file t t) |
| 722 | (save-excursion | 727 | (save-excursion |
| 723 | (find-file temp-file) | 728 | (find-file temp-file) |
| 729 | ;; Check for the mysterious "# coding: ..." header, remove it | ||
| 730 | ;; and give a shout | ||
| 731 | (goto-char (point-min)) | ||
| 732 | (when (re-search-forward "# coding: .*?\n" nil t) | ||
| 733 | (message (concat "%s\n" | ||
| 734 | "Found mysterious \"# coding ...\" header! Removing it.\n" | ||
| 735 | "Current Modes: %s, %s\n" | ||
| 736 | "Current test: %s\n" | ||
| 737 | "%s") | ||
| 738 | (make-string 70 ?*) | ||
| 739 | major-mode | ||
| 740 | minor-mode-list | ||
| 741 | (ert-running-test) | ||
| 742 | (make-string 70 ?*)) | ||
| 743 | (buffer-disable-undo) | ||
| 744 | (replace-match "") | ||
| 745 | (set-buffer-modified-p nil)) | ||
| 746 | |||
| 724 | (let ((result (buffer-substring-no-properties (point-min) (point-max)))) | 747 | (let ((result (buffer-substring-no-properties (point-min) (point-max)))) |
| 725 | (should (string= expected-output result))) | 748 | (should (string= expected-output result))) |
| 726 | (kill-buffer (find-buffer-visiting temp-file)) | 749 | (kill-buffer (find-buffer-visiting temp-file)) |
| 727 | (delete-file temp-file)))) | 750 | (delete-file temp-file)))) |
| 728 | 751 | ||