]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-sysusers: sort examples
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 27 Sep 2020 09:30:17 +0000 (11:30 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 1 Oct 2020 15:52:51 +0000 (17:52 +0200)
This shouldn't affect the outcome, but makes outputs easier to compare.

test/test-sysusers.sh.in

index ac07c2145b1f41691f4e2e65cc00fa8593c77014..b84d6f2d80b0cde1325d800a1f04f623d76c1b37 100755 (executable)
@@ -41,7 +41,7 @@ compare() {
 rm -f $TESTDIR/etc/sysusers.d/* $TESTDIR/usr/lib/sysusers.d/*
 
 # happy tests
-for f in $SOURCE/test-*.input; do
+for f in $(ls -1 $SOURCE/test-*.input | sort -V); do
     echo "*** Running $f"
     prepare_testdir ${f%.input}
     cp $f $TESTDIR/usr/lib/sysusers.d/test.conf
@@ -50,7 +50,7 @@ for f in $SOURCE/test-*.input; do
     compare $f ""
 done
 
-for f in $SOURCE/test-*.input; do
+for f in $(ls -1 $SOURCE/test-*.input | sort -V); do
     echo "*** Running $f on stdin"
     prepare_testdir ${f%.input}
     touch $TESTDIR/etc/sysusers.d/test.conf
@@ -59,7 +59,7 @@ for f in $SOURCE/test-*.input; do
     compare $f "on stdin"
 done
 
-for f in $SOURCE/test-*.input; do
+for f in $(ls -1 $SOURCE/test-*.input | sort -V); do
     echo "*** Running $f on stdin with --replace"
     prepare_testdir ${f%.input}
     touch $TESTDIR/etc/sysusers.d/test.conf
@@ -98,7 +98,7 @@ compare $SOURCE/inline "(--inline --replace=…)"
 rm -f $TESTDIR/etc/sysusers.d/* $TESTDIR/usr/lib/sysusers.d/*
 
 # tests for error conditions
-for f in $SOURCE/unhappy-*.input; do
+for f in $(ls -1 $SOURCE/unhappy-*.input | sort -V); do
     echo "*** Running test $f"
     prepare_testdir ${f%.input}
     cp $f $TESTDIR/usr/lib/sysusers.d/test.conf