summaryrefslogtreecommitdiff
path: root/tests/test-system-lib-executable-exists-p.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-11-14 02:31:16 -0600
committerCraig Jennings <c@cjennings.net>2025-11-14 02:31:16 -0600
commit9d55ed149e100b4fb3ef6f5a79d263dcb26ce835 (patch)
treeb02a77b84849f15b4302fda8f3f8e3942cb253ac /tests/test-system-lib-executable-exists-p.el
parent7b982b1984dd37af42a2dfc9f4c3e52b27102860 (diff)
checking in modified/removed tests and other misc changes
Diffstat (limited to 'tests/test-system-lib-executable-exists-p.el')
-rw-r--r--tests/test-system-lib-executable-exists-p.el73
1 files changed, 0 insertions, 73 deletions
diff --git a/tests/test-system-lib-executable-exists-p.el b/tests/test-system-lib-executable-exists-p.el
deleted file mode 100644
index 457bb010..00000000
--- a/tests/test-system-lib-executable-exists-p.el
+++ /dev/null
@@ -1,73 +0,0 @@
-;;; test-system-lib-executable-exists-p.el --- Tests for cj/executable-exists-p -*- lexical-binding: t; -*-
-
-;;; Commentary:
-;; Unit tests for cj/executable-exists-p function from system-lib.el.
-;; Tests whether external programs are correctly detected in PATH.
-
-;;; Code:
-
-(require 'ert)
-(require 'system-lib)
-
-;;; Normal Cases
-
-(ert-deftest test-system-lib-executable-exists-p-normal-existing-program-returns-path ()
- "Test that existing program in PATH returns non-nil.
-
-Standard case: checking for a program that definitely exists on all systems."
- (should (cj/executable-exists-p "ls")))
-
-(ert-deftest test-system-lib-executable-exists-p-normal-diff-exists-returns-path ()
- "Test that diff program exists and is detected.
-
-Tests specifically for diff which we use in our diff functionality."
- (should (cj/executable-exists-p "diff")))
-
-;;; Boundary Cases
-
-(ert-deftest test-system-lib-executable-exists-p-boundary-empty-string-returns-nil ()
- "Test that empty string returns nil.
-
-Boundary case: empty string is not a valid program name."
- (should-not (cj/executable-exists-p "")))
-
-(ert-deftest test-system-lib-executable-exists-p-boundary-whitespace-only-returns-nil ()
- "Test that whitespace-only string returns nil.
-
-Boundary case: strings containing only whitespace are not valid programs."
- (should-not (cj/executable-exists-p " ")))
-
-(ert-deftest test-system-lib-executable-exists-p-boundary-absolute-path-returns-path ()
- "Test that absolute path to executable returns the path.
-
-Boundary case: executable-find accepts both program names and full paths."
- (should (cj/executable-exists-p "/usr/bin/ls")))
-
-;;; Error Cases
-
-(ert-deftest test-system-lib-executable-exists-p-error-nil-input-returns-nil ()
- "Test that nil input returns nil gracefully.
-
-Error case: nil is not a valid program name."
- (should-not (cj/executable-exists-p nil)))
-
-(ert-deftest test-system-lib-executable-exists-p-error-number-input-returns-nil ()
- "Test that numeric input returns nil gracefully.
-
-Error case: number is not a valid program name."
- (should-not (cj/executable-exists-p 42)))
-
-(ert-deftest test-system-lib-executable-exists-p-error-nonexistent-program-returns-nil ()
- "Test that nonexistent program returns nil.
-
-Error case: program that definitely doesn't exist in PATH."
- (should-not (cj/executable-exists-p "this-program-definitely-does-not-exist-xyz123")))
-
-(ert-deftest test-system-lib-executable-exists-p-error-special-characters-returns-nil ()
- "Test that program name with special characters returns nil.
-
-Error case: invalid characters in program name."
- (should-not (cj/executable-exists-p "program-with-$pecial-ch@rs")))
-
-(provide 'test-system-lib-executable-exists-p)
-;;; test-system-lib-executable-exists-p.el ends here