diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 6 | ||||
| -rw-r--r-- | test/automated/tildify-tests.el | 17 |
2 files changed, 14 insertions, 9 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 38a4feb528f..6248d6cb9a6 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2014-06-05 Michal Nazarewicz <mina86@mina86.com> | 1 | 2014-06-05 Michal Nazarewicz <mina86@mina86.com> |
| 2 | 2 | ||
| 3 | * automated/tildify-tests.el (tildify-test-find-env-end-re-bug) | ||
| 4 | (tildify-test-find-env-group-index-bug): Update to support new | ||
| 5 | signature of the `tildify-foreach-region-outside-env' function. | ||
| 6 | Namely, it now takes pairs as an argument instead of looking it up in | ||
| 7 | `tildify-ignored-environments-alist'. | ||
| 8 | |||
| 3 | * automated/tildify-tests.el (tildify-test--example-html): Add support | 9 | * automated/tildify-tests.el (tildify-test--example-html): Add support |
| 4 | for generating XML code, so that… | 10 | for generating XML code, so that… |
| 5 | (tildify-test-xml) …test can be added to check handling of XML | 11 | (tildify-test-xml) …test can be added to check handling of XML |
diff --git a/test/automated/tildify-tests.el b/test/automated/tildify-tests.el index dd404fcac22..cf18320030d 100644 --- a/test/automated/tildify-tests.el +++ b/test/automated/tildify-tests.el | |||
| @@ -114,23 +114,22 @@ latter is missing, SENTENCE will be used in all placeholder positions." | |||
| 114 | (ert-deftest tildify-test-find-env-end-re-bug () | 114 | (ert-deftest tildify-test-find-env-end-re-bug () |
| 115 | "Tests generation of end-regex using mix of indexes and strings" | 115 | "Tests generation of end-regex using mix of indexes and strings" |
| 116 | (with-temp-buffer | 116 | (with-temp-buffer |
| 117 | (let ((tildify-ignored-environments-alist | 117 | (insert "foo whatever end-foo") |
| 118 | `((,major-mode ("foo\\|bar" . ("end-" 0)))))) | 118 | (goto-char (point-min)) |
| 119 | (insert "foo whatever end-foo") | 119 | (should (string-equal "end-foo" |
| 120 | (goto-char (point-min)) | 120 | (tildify-find-env "foo\\|bar" |
| 121 | (should (string-equal "end-foo" (tildify-find-env "foo\\|bar")))))) | 121 | '(("foo\\|bar" . ("end-" 0)))))))) |
| 122 | 122 | ||
| 123 | 123 | ||
| 124 | (ert-deftest tildify-test-find-env-group-index-bug () | 124 | (ert-deftest tildify-test-find-env-group-index-bug () |
| 125 | "Tests generation of match-string indexes" | 125 | "Tests generation of match-string indexes" |
| 126 | (with-temp-buffer | 126 | (with-temp-buffer |
| 127 | (let ((tildify-ignored-environments-alist | 127 | (let ((pairs '(("start-\\(foo\\|bar\\)" . ("end-" 1)) |
| 128 | `((,major-mode ("start-\\(foo\\|bar\\)" . ("end-" 1)) | 128 | ("open-\\(foo\\|bar\\)" . ("close-" 1)))) |
| 129 | ("open-\\(foo\\|bar\\)" . ("close-" 1))))) | ||
| 130 | (beg-re "start-\\(foo\\|bar\\)\\|open-\\(foo\\|bar\\)")) | 129 | (beg-re "start-\\(foo\\|bar\\)\\|open-\\(foo\\|bar\\)")) |
| 131 | (insert "open-foo whatever close-foo") | 130 | (insert "open-foo whatever close-foo") |
| 132 | (goto-char (point-min)) | 131 | (goto-char (point-min)) |
| 133 | (should (string-equal "close-foo" (tildify-find-env beg-re)))))) | 132 | (should (string-equal "close-foo" (tildify-find-env beg-re pairs)))))) |
| 134 | 133 | ||
| 135 | 134 | ||
| 136 | (provide 'tildify-tests) | 135 | (provide 'tildify-tests) |