From d4ca24fcf04f5c3356deb462bf69cb76b6cf85a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= <frederic.danis@collabora.com>
Date: Thu, 29 Jul 2021 09:53:48 +0200
Subject: [PATCH] run-aa-test: Fix call to csplit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

New version of `csplit` from `rust-coreutils` fails with following error:
  $ csplit R1.13a.1_bluez-spp.expected -f /tmp/EXPECT -b "%d" "/^## alternative ##$/" {*}
  csplit: error: incorrect conversion specification in suffix

Replacing `%d` by `%0d` fixes it.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
---
 run-aa-test | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/run-aa-test b/run-aa-test
index 2ed2147..b9b2eb3 100755
--- a/run-aa-test
+++ b/run-aa-test
@@ -143,7 +143,7 @@ echo "#---8<--- expected parsed apparmor output from journal"
 cat ${EXPECT_FILE} | sed 's/^/# /'
 echo "#--->8---"
 
-csplit ${EXPECT_FILE} -f ${TMP_DIR}/EXPECT -b "%d" "/^${ALTERNATIVE_SEPARATOR}$/" {*}
+csplit ${EXPECT_FILE} -f ${TMP_DIR}/EXPECT -b "%0d" "/^${ALTERNATIVE_SEPARATOR}$/" {*}
 
 # Old versions of csplit don't provide "--suppress-matched", strip separator separately
 for FILE in ${TMP_DIR}/EXPECT*; do
-- 
GitLab