acst

Tracks changes and corruption in files using xattr-based checksums.
git clone https://noxz.tech/git/acst.git
Log | Files | Tags | LICENSE

commit: 9b533c9ba5cfd7b79fe5b63b1220b84202dec405
parent: 6015e6ea1708f82bca0edbabb1fcc638b01a8819
author: Chris Noxz <chris@noxz.tech>
date:   Fri, 1 Jul 2022 08:35:12 +0200
Sort output for multiple files in test

This is so that the test doesn't fail because of different systems'
handling of recursion.
Mtest8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test b/test
@@ -265,7 +265,7 @@ TMPFILE="$(mktemp -d XXXXXXXXXX)" && {
 	fi
 	set -e
 	diff -u expected output
-	cat > expected <<- EOF
+	sort > expected <<- EOF
 	<new> object/level-1/file-1
 	 stored: 0000000000000000000000000000000000000000000000000000000000000000 0000000000.000000000
 	 actual: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 1655848860.000000000
@@ -276,13 +276,13 @@ TMPFILE="$(mktemp -d XXXXXXXXXX)" && {
 	 stored: 0000000000000000000000000000000000000000000000000000000000000000 0000000000.000000000
 	 actual: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 1655848980.000000000
 	EOF
-	../"${PRG}" -r object > output
+	../"${PRG}" -r object | sort > output
 	diff -u expected output
 	rm -rf object
 
 	#########################################################################
 	header 'multiple files'
-	cat > expected <<- EOF
+	sort > expected <<- EOF
 	<new> object/level-1/file-1
 	 stored: 0000000000000000000000000000000000000000000000000000000000000000 0000000000.000000000
 	 actual: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 1655848860.000000000
@@ -298,7 +298,7 @@ TMPFILE="$(mktemp -d XXXXXXXXXX)" && {
 	TZ=CET touch -t 202206220001 object/level-1/file-1
 	TZ=CET touch -t 202206220002 object/level-1/level-2/file-2
 	TZ=CET touch -t 202206220003 object/level-1/level-2/level-3/file-3
-	find object -xdev -type f -print0 | xargs -r0 ../"${PRG}" > output
+	find object -xdev -type f -print0 | xargs -r0 ../"${PRG}" | sort > output
 	diff -u expected output
 	rm -rf object