From a543556aad75d55594ddfd36e4aabc5fbd7b73c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 12 Sep 2024 11:08:04 +0200 Subject: [PATCH] fix aarch64 test --- tests/functional/flakes/show.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/functional/flakes/show.sh b/tests/functional/flakes/show.sh index 0edc450c345..c7eb7f0b5cb 100755 --- a/tests/functional/flakes/show.sh +++ b/tests/functional/flakes/show.sh @@ -106,9 +106,17 @@ cat >flake.nix< ./show-output.txt +# close stderr, to force consistent tty size across different environments +nix flake show > ./show-output.txt 2>/dev/null +cat show-output.txt >&2 test "$(awk -F '[:] ' '/aNoDescription/{print $NF}' ./show-output.txt)" = "package 'simple'" test "$(awk -F '[:] ' '/bOneLineDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - 'one line'" test "$(awk -F '[:] ' '/cMultiLineDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - 'line one'" -test "$(awk -F '[:] ' '/dLongDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - '012345678901234567890123456..." -test "$(awk -F '[:] ' '/eEmptyDescription/{print $NF}' ./show-output.txt)" = "package 'simple'" \ No newline at end of file +dLongDescription=$(awk -F '[:] ' '/dLongDescription/{print $NF}' ./show-output.txt) +if [[ $dLongDescription == "package 'simple' - '0123456789"* ]]; then + : +else + echo "description not as expected: $dLongDescription" + false +fi +test "$(awk -F '[:] ' '/eEmptyDescription/{print $NF}' ./show-output.txt)" = "package 'simple'"