diff options
| author | Lars Ingebrigtsen | 2022-06-11 14:39:54 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-06-11 14:39:54 +0200 |
| commit | cb4579ed6ba45c81ee7ec627bf197e1def121f24 (patch) | |
| tree | 1876c474349aad31d42f06587f68510ed8988ad2 /test/src | |
| parent | 36758096961930baaf0e271522abfb78ff7f656d (diff) | |
| download | emacs-cb4579ed6ba45c81ee7ec627bf197e1def121f24.tar.gz emacs-cb4579ed6ba45c81ee7ec627bf197e1def121f24.zip | |
Allow inserting parts of /dev/urandom with insert-file-contents
* doc/lispref/files.texi (Reading from Files): Document it.
* src/fileio.c (Finsert_file_contents): Allow specifying END for
special files (bug#18370).
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/fileio-tests.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el index 511490c5745..a9a43781d49 100644 --- a/test/src/fileio-tests.el +++ b/test/src/fileio-tests.el | |||
| @@ -193,4 +193,11 @@ Also check that an encoding error can appear in a symlink." | |||
| 193 | (should (equal (file-name-concat "" "bar") "bar")) | 193 | (should (equal (file-name-concat "" "bar") "bar")) |
| 194 | (should (equal (file-name-concat "" "") ""))) | 194 | (should (equal (file-name-concat "" "") ""))) |
| 195 | 195 | ||
| 196 | (defun test-non-regular-insert () | ||
| 197 | (skip-unless (file-exists-p "/dev/urandom")) | ||
| 198 | (with-temp-buffer | ||
| 199 | (should-error (insert-file-contents "/dev/urandom" nil 5 10)) | ||
| 200 | (insert-file-contents "/dev/urandom" nil nil 10) | ||
| 201 | (should (= (point-max) 10)))) | ||
| 202 | |||
| 196 | ;;; fileio-tests.el ends here | 203 | ;;; fileio-tests.el ends here |