1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

renameatu tests: Enhance test of the RENAME_* macros.

* tests/test-renameatu.c (main): Test that the RENAME_* macro values are
disjoint.
This commit is contained in:
Bruno Haible
2026-03-30 12:19:35 +02:00
parent dd1891a52c
commit 444e632563
2 changed files with 11 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2026-03-30 Bruno Haible <bruno@clisp.org>
renameatu tests: Enhance test of the RENAME_* macros.
* tests/test-renameatu.c (main): Test that the RENAME_* macro values are
disjoint.
2026-03-29 Collin Funk <collin.funk1@gmail.com>
renameatu tests: Test that the RENAME_* macros are defined.

View File

@@ -59,7 +59,7 @@ main (void)
char *cwd;
int result;
/* Test that the RENAME_* macros are defined and unique. */
/* Test that the RENAME_* macros are defined and have distinct values. */
switch (0)
{
case RENAME_NOREPLACE:
@@ -68,6 +68,10 @@ main (void)
default:
;
}
/* Test that the RENAME_* macros have disjoint values (as bit sets). */
ASSERT ((RENAME_NOREPLACE & RENAME_EXCHANGE) == 0);
ASSERT ((RENAME_NOREPLACE & RENAME_WHITEOUT) == 0);
ASSERT ((RENAME_EXCHANGE & RENAME_WHITEOUT) == 0);
/* Clean up any trash from prior testsuite runs. */
ignore_value (system ("rm -rf " BASE "*"));