diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2025-10-18 19:07:35 +0200 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2025-10-18 19:07:35 +0200 |
| commit | fa23d938c040bc8af305a31fa874df55b2a02576 (patch) | |
| tree | 9704e2f7bd8962ea8911cd6f4e2d37227d7eff2e /tests/test-stat.h | |
| parent | df9dbf9b0915e432a4a2c4182f60af36374eaaab (diff) | |
| parent | 693ae7b71dfdd1a8146266b5794a71c0dbe5dff0 (diff) | |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'tests/test-stat.h')
| -rw-r--r-- | tests/test-stat.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test-stat.h b/tests/test-stat.h index a76f38f9..d055522f 100644 --- a/tests/test-stat.h +++ b/tests/test-stat.h @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2024 Free Software Foundation, Inc. + Copyright (C) 2009-2025 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -61,6 +61,11 @@ test_stat_func (int (*func) (char const *, struct stat *), bool print) ASSERT (func (BASE "file/", &st1) == -1); ASSERT (errno == ENOTDIR); + /* /dev/null is a character device. */ + ASSERT (func ("/dev/null", &st1) == 0); + ASSERT (!S_ISREG (st1.st_mode)); + ASSERT (S_ISCHR (st1.st_mode)); + /* Now for some symlink tests, where supported. We set up: link1 -> directory link2 -> file |
