summaryrefslogtreecommitdiff
path: root/src/test/test-stat-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-06-17 12:37:16 -0400
committerSven Eden <yamakuzure@gmx.net>2017-07-25 09:46:52 +0200
commit15f07f3172e69e87b1c6d3d03911e3dc38b0110c (patch)
tree40d4b08aec2bf4b7da65968c609ec47517eabf02 /src/test/test-stat-util.c
parent1ea8dbd9cd30a46d8f410a7f651bd3e730d2378a (diff)
basic/path-util: allow flags for path_equal_or_files_same
No functional change, just a new parameters and the tests that AT_SYMLINK_NOFOLLOW works as expected.
Diffstat (limited to 'src/test/test-stat-util.c')
-rw-r--r--src/test/test-stat-util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test-stat-util.c b/src/test/test-stat-util.c
index 93d025dac..2825dbc52 100644
--- a/src/test/test-stat-util.c
+++ b/src/test/test-stat-util.c
@@ -38,8 +38,10 @@ static void test_files_same(void) {
assert_se(fd >= 0);
assert_se(symlink(name, name_alias) >= 0);
- assert_se(files_same(name, name));
- assert_se(files_same(name, name_alias));
+ assert_se(files_same(name, name, 0));
+ assert_se(files_same(name, name, AT_SYMLINK_NOFOLLOW));
+ assert_se(files_same(name, name_alias, 0));
+ assert_se(!files_same(name, name_alias, AT_SYMLINK_NOFOLLOW));
unlink(name);
unlink(name_alias);