summaryrefslogtreecommitdiffstats
path: root/test/test-compare-versions.sh
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-25 10:18:14 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-25 16:01:14 +0200
commitc20b2f2421011a2c29fa04cc1955ed67b87daeb2 (patch)
tree5b1ab71fe8a5398e361678024d49fc47a10b2265 /test/test-compare-versions.sh
parentkernel-install: ignore extra args passed when invoked as installkernel (diff)
downloadsystemd-c20b2f2421011a2c29fa04cc1955ed67b87daeb2.tar.xz
systemd-c20b2f2421011a2c29fa04cc1955ed67b87daeb2.zip
analyze: use '' instead of the empty string when showing versions
It looks like garbled output… I didn't use shell-escape, because the other characters that are special for the shell that are used in versions should not be escaped.
Diffstat (limited to 'test/test-compare-versions.sh')
-rwxr-xr-xtest/test-compare-versions.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test-compare-versions.sh b/test/test-compare-versions.sh
index 6cfcc158e6..c40208be60 100755
--- a/test/test-compare-versions.sh
+++ b/test/test-compare-versions.sh
@@ -17,9 +17,10 @@ $ANALYZE compare-versions 1 '!=' 2
( ! $ANALYZE compare-versions 1 gt 2 )
( ! $ANALYZE compare-versions 1 '>' 2 )
-$ANALYZE compare-versions 1 2 | grep ' < '
-$ANALYZE compare-versions 2 2 | grep ' == '
-$ANALYZE compare-versions 2 1 | grep ' > '
+test "$($ANALYZE compare-versions 1 2)" = '1 < 2'
+test "$($ANALYZE compare-versions 2 2)" = '2 == 2'
+test "$($ANALYZE compare-versions 2 1)" = '2 > 1'
+test "$($ANALYZE compare-versions '' '')" = "'' == ''"
set +e