(goto-char (point-min))
;; First find the line to put it on.
(when (re-search-forward "^total" nil t)
- (let ((available (get-free-disk-space ".")))
+ (let ((available (get-free-disk-space orig-file)))
(when available
;; Replace "total" with "total used", to avoid confusion.
(replace-match "total used in directory")
(ert-with-temp-file temp-file-name
(with-temp-buffer
(insert files-tests-lao)
- (write-file temp-file-name)
- (erase-buffer)
- (insert files-tests-tzu)
- (revert-buffer t t t)
+ ;; Disable lock files, since that barfs in
+ ;; userlock--check-content-unchanged on MS-Windows.
+ (let (create-lockfiles)
+ (write-file temp-file-name)
+ (erase-buffer)
+ (insert files-tests-tzu)
+ (revert-buffer t t t))
(should (compare-strings files-tests-lao nil nil
(buffer-substring (point-min) (point-max))
nil nil)))))
(ert-with-temp-file temp-file-name
(with-temp-buffer
(insert files-tests-lao)
- (write-file temp-file-name)
- (erase-buffer)
- (insert files-tests-tzu)
- (should (revert-buffer-with-fine-grain t t))
+ ;; Disable lock files, since that barfs in
+ ;; userlock--check-content-unchanged on MS-Windows.
+ (let (create-lockfiles)
+ (write-file temp-file-name)
+ (erase-buffer)
+ (insert files-tests-tzu)
+ (should (revert-buffer-with-fine-grain t t)))
(should (compare-strings files-tests-lao nil nil
(buffer-substring (point-min) (point-max))
nil nil)))))