diff options
| author | Lars Ingebrigtsen | 2021-08-21 15:24:15 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-08-21 15:24:15 +0200 |
| commit | cabd22f5c6c2f47b1f6efd627e9e760a31e8f015 (patch) | |
| tree | 9d0344273c40748617a71cf4075eb57a49770f36 /test/src | |
| parent | 3de577ad0079ecca815086b5f07403cd8e5701a2 (diff) | |
| download | emacs-cabd22f5c6c2f47b1f6efd627e9e760a31e8f015.tar.gz emacs-cabd22f5c6c2f47b1f6efd627e9e760a31e8f015.zip | |
Make parse-partial-sexp signal an error if TO is smaller than FROM
* src/syntax.c (Fparse_partial_sexp): Signal an error if TO is
smaller than FROM (bug#49944).
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/syntax-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/src/syntax-tests.el b/test/src/syntax-tests.el index e4e3054d37a..bd89283dd14 100644 --- a/test/src/syntax-tests.el +++ b/test/src/syntax-tests.el | |||
| @@ -500,4 +500,10 @@ the `parse-partial-sexp's are expected to stop. See | |||
| 500 | (syntax-pps-comments /* 56 76 77 58) | 500 | (syntax-pps-comments /* 56 76 77 58) |
| 501 | (syntax-pps-comments /* 60 78 79) | 501 | (syntax-pps-comments /* 60 78 79) |
| 502 | 502 | ||
| 503 | (ert-deftest test-from-to-parse-partial-sexp () | ||
| 504 | (with-temp-buffer | ||
| 505 | (insert "foo") | ||
| 506 | (should (parse-partial-sexp 1 1)) | ||
| 507 | (should-error (parse-partial-sexp 2 1)))) | ||
| 508 | |||
| 503 | ;;; syntax-tests.el ends here | 509 | ;;; syntax-tests.el ends here |