emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 36b5050ec4: fileio-tests.el (test-non-regular-insert): Fix thinko


From: Stefan Monnier
Subject: master 36b5050ec4: fileio-tests.el (test-non-regular-insert): Fix thinko
Date: Sat, 11 Jun 2022 11:57:34 -0400 (EDT)

branch: master
commit 36b5050ec436d2703005cc862edc510ff6a3b4cf
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    fileio-tests.el (test-non-regular-insert): Fix thinko
    
    * test/src/fileio-tests.el (fileio-tests--non-regular-insert): Rename
    from `test-non-regular-insert` and make it into a test rather than
    a broken function.  Oh, and make it work while at it.
---
 test/src/fileio-tests.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el
index a9a43781d4..29f11fc472 100644
--- a/test/src/fileio-tests.el
+++ b/test/src/fileio-tests.el
@@ -138,7 +138,7 @@ Also check that an encoding error can appear in a symlink."
     (should (and (file-name-absolute-p name)
                  (not (eq (aref name 0) ?~))))))
 
-(ert-deftest fileio-test--expand-file-name-null-bytes ()
+(ert-deftest fileio-tests--expand-file-name-null-bytes ()
   "Test that `expand-file-name' checks for null bytes in filenames."
   (should-error (expand-file-name (concat "file" (char-to-string ?\0) ".txt"))
                 :type 'wrong-type-argument)
@@ -193,11 +193,11 @@ Also check that an encoding error can appear in a 
symlink."
   (should (equal (file-name-concat "" "bar") "bar"))
   (should (equal (file-name-concat "" "") "")))
 
-(defun test-non-regular-insert ()
+(ert-deftest fileio-tests--non-regular-insert ()
   (skip-unless (file-exists-p "/dev/urandom"))
   (with-temp-buffer
     (should-error (insert-file-contents "/dev/urandom" nil 5 10))
     (insert-file-contents "/dev/urandom" nil nil 10)
-    (should (= (point-max) 10))))
+    (should (= (buffer-size) 10))))
 
 ;;; fileio-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]