aboutsummaryrefslogtreecommitdiff
path: root/tests/test-dev-fkeys--f4-compile-only.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-dev-fkeys--f4-compile-only.el')
-rw-r--r--tests/test-dev-fkeys--f4-compile-only.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-dev-fkeys--f4-compile-only.el b/tests/test-dev-fkeys--f4-compile-only.el
index b0eec3670..815aa0977 100644
--- a/tests/test-dev-fkeys--f4-compile-only.el
+++ b/tests/test-dev-fkeys--f4-compile-only.el
@@ -36,6 +36,18 @@
(cj/f4-compile-only)
(should (= calls 1))))))
+(ert-deftest test-dev-fkeys-f4-compile-only-propagates-prefix-arg ()
+ "Normal: on a compiled project, `current-prefix-arg' is forwarded to
+projectile-compile-project so `C-u C-F4' forces a re-prompt."
+ (test-dev-fkeys-co--with-project '("go.mod")
+ (let ((seen-arg 'unset)
+ (current-prefix-arg t))
+ (cl-letf (((symbol-function 'cj/--f4-project-root) (lambda () root))
+ ((symbol-function 'projectile-compile-project)
+ (lambda (arg) (setq seen-arg arg))))
+ (cj/f4-compile-only)
+ (should (eq seen-arg t))))))
+
(ert-deftest test-dev-fkeys-f4-compile-only-interpreted-project-skips-compile ()
"Normal: on an interpreted project, projectile-compile-project does not run."
(test-dev-fkeys-co--with-project '("pyproject.toml")