diff options
| author | Glenn Morris | 2017-06-12 17:17:20 -0400 |
|---|---|---|
| committer | Glenn Morris | 2017-06-12 17:17:20 -0400 |
| commit | 1612d3dd78875b518ebcbcf046e6f9510ff69c99 (patch) | |
| tree | 675673143050f6b21527c93a6a3f7b98cbc2509d /test/src | |
| parent | 6096f81151280b6db59c0432f86b63ae766b374a (diff) | |
| download | emacs-1612d3dd78875b518ebcbcf046e6f9510ff69c99.tar.gz emacs-1612d3dd78875b518ebcbcf046e6f9510ff69c99.zip | |
Small improvement for module assertion test
* test/src/emacs-module-tests.el (module--test-assertions):
Don't rely on the precise form of an "Abort" message.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/emacs-module-tests.el | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 99a853b17e0..502143dd48d 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el | |||
| @@ -188,21 +188,21 @@ changes." | |||
| 188 | ;; This doesn’t yet cause undefined behavior. | 188 | ;; This doesn’t yet cause undefined behavior. |
| 189 | (should (eq (mod-test-invalid-store) 123)) | 189 | (should (eq (mod-test-invalid-store) 123)) |
| 190 | (with-temp-buffer | 190 | (with-temp-buffer |
| 191 | (should (equal (call-process mod-test-emacs nil t nil | 191 | ;; FIXME this dumps a core file if the user has them enabled, |
| 192 | "-batch" "-Q" "-module-assertions" "-eval" | 192 | ;; which seems unfriendly. |
| 193 | (prin1-to-string | 193 | (should (string-match-p |
| 194 | `(progn | 194 | "Abort" ; eg "Aborted" or "Abort trap: 6" |
| 195 | (require 'mod-test ,mod-test-file) | 195 | (call-process mod-test-emacs nil t nil |
| 196 | ;; Storing and reloading a local | 196 | "-batch" "-Q" "-module-assertions" "-eval" |
| 197 | ;; value causes undefined | 197 | (prin1-to-string |
| 198 | ;; behavior, which should be | 198 | `(progn |
| 199 | ;; detected by the module | 199 | (require 'mod-test ,mod-test-file) |
| 200 | ;; assertions. | 200 | ;; Storing and reloading a local value |
| 201 | (mod-test-invalid-store) | 201 | ;; causes undefined behavior, which should be |
| 202 | (mod-test-invalid-load)))) | 202 | ;; detected by the module assertions. |
| 203 | ;; FIXME: This string is probably different on | 203 | (mod-test-invalid-store) |
| 204 | ;; Windows and Linux. | 204 | (mod-test-invalid-load)))))) |
| 205 | "Abort trap: 6")) | 205 | ;; FIXME a failure here gives an uninformative error. |
| 206 | (re-search-backward (rx bos "Emacs module assertion: " | 206 | (re-search-backward (rx bos "Emacs module assertion: " |
| 207 | "Emacs value not found in " | 207 | "Emacs value not found in " |
| 208 | (+ digit) " values of " | 208 | (+ digit) " values of " |