summaryrefslogtreecommitdiff
path: root/tests/test-video-audio-recording-ffmpeg-functions.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-video-audio-recording-ffmpeg-functions.el')
-rw-r--r--tests/test-video-audio-recording-ffmpeg-functions.el32
1 files changed, 24 insertions, 8 deletions
diff --git a/tests/test-video-audio-recording-ffmpeg-functions.el b/tests/test-video-audio-recording-ffmpeg-functions.el
index a3bac0cf..549aa317 100644
--- a/tests/test-video-audio-recording-ffmpeg-functions.el
+++ b/tests/test-video-audio-recording-ffmpeg-functions.el
@@ -52,7 +52,9 @@
(cl-letf (((symbol-function 'start-process-shell-command)
(lambda (_name _buffer _command)
(setq process-created t)
- (make-process :name "fake-video" :command '("sleep" "1000")))))
+ (make-process :name "fake-video" :command '("sleep" "1000"))))
+ ((symbol-function 'cj/recording--validate-system-audio)
+ (lambda () nil)))
(cj/ffmpeg-record-video video-recordings-dir)
(should process-created)
(should cj/video-recording-ffmpeg-process)))
@@ -69,7 +71,9 @@
((symbol-function 'set-process-sentinel)
(lambda (_proc sentinel)
(should (eq sentinel #'cj/recording-process-sentinel))
- (setq sentinel-attached t))))
+ (setq sentinel-attached t)))
+ ((symbol-function 'cj/recording--validate-system-audio)
+ (lambda () nil)))
(cj/ffmpeg-record-video video-recordings-dir)
(should sentinel-attached)))
(test-ffmpeg-teardown)))
@@ -83,7 +87,9 @@
(lambda (_name _buffer _command)
(make-process :name "fake-video" :command '("sleep" "1000"))))
((symbol-function 'force-mode-line-update)
- (lambda (&optional _all) (setq update-called t))))
+ (lambda (&optional _all) (setq update-called t)))
+ ((symbol-function 'cj/recording--validate-system-audio)
+ (lambda () nil)))
(cj/ffmpeg-record-video video-recordings-dir)
(should update-called)))
(test-ffmpeg-teardown)))
@@ -96,7 +102,9 @@
(cl-letf (((symbol-function 'start-process-shell-command)
(lambda (_name _buffer cmd)
(setq command cmd)
- (make-process :name "fake-video" :command '("sleep" "1000")))))
+ (make-process :name "fake-video" :command '("sleep" "1000"))))
+ ((symbol-function 'cj/recording--validate-system-audio)
+ (lambda () nil)))
(cj/ffmpeg-record-video video-recordings-dir)
(should (string-match-p "test-mic-device" command))
(should (string-match-p "test-monitor-device" command))
@@ -114,7 +122,9 @@
(cl-letf (((symbol-function 'start-process-shell-command)
(lambda (_name _buffer _command)
(setq process-created t)
- (make-process :name "fake-audio" :command '("sleep" "1000")))))
+ (make-process :name "fake-audio" :command '("sleep" "1000"))))
+ ((symbol-function 'cj/recording--validate-system-audio)
+ (lambda () nil)))
(cj/ffmpeg-record-audio audio-recordings-dir)
(should process-created)
(should cj/audio-recording-ffmpeg-process)))
@@ -131,7 +141,9 @@
((symbol-function 'set-process-sentinel)
(lambda (_proc sentinel)
(should (eq sentinel #'cj/recording-process-sentinel))
- (setq sentinel-attached t))))
+ (setq sentinel-attached t)))
+ ((symbol-function 'cj/recording--validate-system-audio)
+ (lambda () nil)))
(cj/ffmpeg-record-audio audio-recordings-dir)
(should sentinel-attached)))
(test-ffmpeg-teardown)))
@@ -145,7 +157,9 @@
(lambda (_name _buffer _command)
(make-process :name "fake-audio" :command '("sleep" "1000"))))
((symbol-function 'force-mode-line-update)
- (lambda (&optional _all) (setq update-called t))))
+ (lambda (&optional _all) (setq update-called t)))
+ ((symbol-function 'cj/recording--validate-system-audio)
+ (lambda () nil)))
(cj/ffmpeg-record-audio audio-recordings-dir)
(should update-called)))
(test-ffmpeg-teardown)))
@@ -158,7 +172,9 @@
(cl-letf (((symbol-function 'start-process-shell-command)
(lambda (_name _buffer cmd)
(setq command cmd)
- (make-process :name "fake-audio" :command '("sleep" "1000")))))
+ (make-process :name "fake-audio" :command '("sleep" "1000"))))
+ ((symbol-function 'cj/recording--validate-system-audio)
+ (lambda () nil)))
(cj/ffmpeg-record-audio audio-recordings-dir)
(should (string-match-p "\\.m4a" command))))
(test-ffmpeg-teardown)))