Hello
AFAIK, there isn't a test in ls to verify that using setfactl on
directory shows a "+".
This patch should cover this.
Cheers
Sylvestre
From ba6ac397938251bef55459acf0762d16492fb93c Mon Sep 17 00:00:00 2001
From: Sylvestre Ledru <sylves...@debian.org>
Date: Wed, 10 Jan 2024 19:18:05 +0100
Subject: [PATCH] ls: add a test to verify that '+' is added
---
tests/ls/acl.sh | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 tests/ls/acl.sh
diff --git a/tests/ls/acl.sh b/tests/ls/acl.sh
new file mode 100644
index 000000000..95aabfa70
--- /dev/null
+++ b/tests/ls/acl.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# verify that ls -al with acl display the "+"
+
+# Copyright (C) 2011-2024 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
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+print_ver_ ls
+
+require_setfacl_
+
+mkdir k || framework_failure_
+setfacl -d -m user::rwx k || framework_failure_
+ls_l=$(ls -ld k) || fail=1
+
+case $ls_l in
+ drwx*+*) ;;
+ *) fail=1; ;;
+esac
+
+Exit $fail
--
2.43.0