summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-path-util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index bec2a83611..a2cf0af75f 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -158,9 +158,20 @@ static void test_prefixes(void) {
}
}
+static void test_fsck_exists(void) {
+ /* Ensure we use a sane default for PATH. */
+ unsetenv("PATH");
+
+ /* fsck.minix is provided by util-linux and will probably exist. */
+ assert_se(fsck_exists("minix") == 0);
+
+ assert_se(fsck_exists("AbCdE") == -ENOENT);
+}
+
int main(void) {
test_path();
test_find_binary();
test_prefixes();
+ test_fsck_exists();
return 0;
}