;; Steal the file lock.
(tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
- (cl-letf (((symbol-function #'read-char) (lambda (&rest _args) ?s)))
+ (cl-letf (((symbol-function #'read-multiple-choice)
+ (lambda (&rest _args) '(?s))))
(with-no-warnings (lock-file tmp-name1)))
(should (eq (with-no-warnings (file-locked-p tmp-name1)) t))
;; Ignore the file lock.
(tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
- (cl-letf (((symbol-function #'read-char) (lambda (&rest _args) ?p)))
+ (cl-letf (((symbol-function #'read-multiple-choice)
+ (lambda (&rest _args) '(?p))))
(with-no-warnings (lock-file tmp-name1)))
(should (stringp (with-no-warnings (file-locked-p tmp-name1))))
;; Quit the file lock machinery.
(tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
- (cl-letf (((symbol-function #'read-char) (lambda (&rest _args) ?q)))
+ (cl-letf (((symbol-function #'read-multiple-choice)
+ (lambda (&rest _args) '(?q))))
(with-no-warnings
(should-error
(lock-file tmp-name1)