diff options
| author | Ulf Jasper | 2014-11-17 21:06:33 +0100 |
|---|---|---|
| committer | Ulf Jasper | 2014-11-17 21:06:33 +0100 |
| commit | 9e35ff6bcf9c52fb295b4eb5d4dcde37b6a60b65 (patch) | |
| tree | b641b8c903c4529c7585594cd544ddf8f3fd55ad /test | |
| parent | cc5519db12f554a40591ac8a7f4febe17a3bd53b (diff) | |
| parent | 5813f93cab1a81eba6eef735add5ca7cb1d15e8e (diff) | |
| download | emacs-9e35ff6bcf9c52fb295b4eb5d4dcde37b6a60b65.tar.gz emacs-9e35ff6bcf9c52fb295b4eb5d4dcde37b6a60b65.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 6 | ||||
| -rw-r--r-- | test/automated/occur-tests.el | 21 |
2 files changed, 16 insertions, 11 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 6e350cf8ec1..2dfd5151f09 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-11-17 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * automated/occur-tests.el (occur-test-case, occur-test-create): | ||
| 4 | In case of failure, show the actual string, rather than just nil. | ||
| 5 | (occur-tests): Update for apparent change in output re control-chars. | ||
| 6 | |||
| 1 | 2014-11-17 Ulf Jasper <ulf.jasper@web.de> | 7 | 2014-11-17 Ulf Jasper <ulf.jasper@web.de> |
| 2 | 8 | ||
| 3 | * automated/icalendar-tests.el (icalendar-tests--test-export): New | 9 | * automated/icalendar-tests.el (icalendar-tests--test-export): New |
diff --git a/test/automated/occur-tests.el b/test/automated/occur-tests.el index b15e3dc9933..5b90dab494c 100644 --- a/test/automated/occur-tests.el +++ b/test/automated/occur-tests.el | |||
| @@ -52,7 +52,7 @@ a | |||
| 52 | a | 52 | a |
| 53 | a | 53 | a |
| 54 | " "\ | 54 | " "\ |
| 55 | 2 matches for \"a^Ja\" in buffer: *test-occur* | 55 | 2 matches for \"a\na\" in buffer: *test-occur* |
| 56 | 1:a | 56 | 1:a |
| 57 | :a | 57 | :a |
| 58 | 3:a | 58 | 3:a |
| @@ -68,7 +68,7 @@ c | |||
| 68 | a | 68 | a |
| 69 | b | 69 | b |
| 70 | " "\ | 70 | " "\ |
| 71 | 2 matches for \"a^Jb\" in buffer: *test-occur* | 71 | 2 matches for \"a\nb\" in buffer: *test-occur* |
| 72 | 1:a | 72 | 1:a |
| 73 | :b | 73 | :b |
| 74 | 4:a | 74 | 4:a |
| @@ -82,7 +82,7 @@ c | |||
| 82 | a | 82 | a |
| 83 | 83 | ||
| 84 | " "\ | 84 | " "\ |
| 85 | 2 matches for \"a^J\" in buffer: *test-occur* | 85 | 2 matches for \"a\n\" in buffer: *test-occur* |
| 86 | 1:a | 86 | 1:a |
| 87 | : | 87 | : |
| 88 | 4:a | 88 | 4:a |
| @@ -97,7 +97,7 @@ d | |||
| 97 | ex | 97 | ex |
| 98 | fx | 98 | fx |
| 99 | " "\ | 99 | " "\ |
| 100 | 2 matches for \"x^J.x^J\" in buffer: *test-occur* | 100 | 2 matches for \"x\n.x\n\" in buffer: *test-occur* |
| 101 | 1:ax | 101 | 1:ax |
| 102 | :bx | 102 | :bx |
| 103 | :c | 103 | :c |
| @@ -232,7 +232,7 @@ i | |||
| 232 | jx | 232 | jx |
| 233 | kx | 233 | kx |
| 234 | " "\ | 234 | " "\ |
| 235 | 3 matches for \"x^J.x\" in buffer: *test-occur* | 235 | 3 matches for \"x\n.x\" in buffer: *test-occur* |
| 236 | 1:ax | 236 | 1:ax |
| 237 | :bx | 237 | :bx |
| 238 | :c | 238 | :c |
| @@ -256,7 +256,7 @@ f | |||
| 256 | gx | 256 | gx |
| 257 | hx | 257 | hx |
| 258 | " "\ | 258 | " "\ |
| 259 | 2 matches for \"x^J.x\" in buffer: *test-occur* | 259 | 2 matches for \"x\n.x\" in buffer: *test-occur* |
| 260 | 1:ax | 260 | 1:ax |
| 261 | :bx | 261 | :bx |
| 262 | :c | 262 | :c |
| @@ -321,7 +321,6 @@ Each element has the format: | |||
| 321 | (let ((regexp (nth 0 test)) | 321 | (let ((regexp (nth 0 test)) |
| 322 | (nlines (nth 1 test)) | 322 | (nlines (nth 1 test)) |
| 323 | (input-buffer-string (nth 2 test)) | 323 | (input-buffer-string (nth 2 test)) |
| 324 | (output-buffer-string (nth 3 test)) | ||
| 325 | (temp-buffer (get-buffer-create " *test-occur*"))) | 324 | (temp-buffer (get-buffer-create " *test-occur*"))) |
| 326 | (unwind-protect | 325 | (unwind-protect |
| 327 | (save-window-excursion | 326 | (save-window-excursion |
| @@ -329,9 +328,8 @@ Each element has the format: | |||
| 329 | (erase-buffer) | 328 | (erase-buffer) |
| 330 | (insert input-buffer-string) | 329 | (insert input-buffer-string) |
| 331 | (occur regexp nlines) | 330 | (occur regexp nlines) |
| 332 | (equal output-buffer-string | 331 | (with-current-buffer "*Occur*" |
| 333 | (with-current-buffer "*Occur*" | 332 | (buffer-substring-no-properties (point-min) (point-max))))) |
| 334 | (buffer-string))))) | ||
| 335 | (and (buffer-name temp-buffer) | 333 | (and (buffer-name temp-buffer) |
| 336 | (kill-buffer temp-buffer))))) | 334 | (kill-buffer temp-buffer))))) |
| 337 | 335 | ||
| @@ -343,7 +341,8 @@ Each element has the format: | |||
| 343 | `(ert-deftest ,testname () | 341 | `(ert-deftest ,testname () |
| 344 | ,testdoc | 342 | ,testdoc |
| 345 | (let (occur-hook) | 343 | (let (occur-hook) |
| 346 | (should (occur-test-case (nth ,n occur-tests)))))))) | 344 | (should (equal (occur-test-case (nth ,n occur-tests)) |
| 345 | (nth 3 (nth ,n occur-tests))))))))) | ||
| 347 | 346 | ||
| 348 | (dotimes (i (length occur-tests)) | 347 | (dotimes (i (length occur-tests)) |
| 349 | (occur-test-create i)) | 348 | (occur-test-create i)) |