From 677adeec833114f535b62a57c47418f96c9315cf Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Wed, 23 Feb 2022 21:01:46 -0500 Subject: [PATCH] tests: Fix libupkg-index-decode test failure on dash. We need to quote the decode_val assignment which we pass to 'eval', because $val may be the string (empty), and assignments of the form decode_val=(empty) are rejected by dash and other shells. --- tests/libupkg-index-decode.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libupkg-index-decode.sh b/tests/libupkg-index-decode.sh index f5c913d..80b328d 100644 --- a/tests/libupkg-index-decode.sh +++ b/tests/libupkg-index-decode.sh @@ -1,7 +1,7 @@ #!/bin/sh # # Check various corner cases of upkg_decode_index. -# Copyright © 2012 Nick Bowler +# Copyright © 2012, 2022 Nick Bowler # # License WTFPL2: Do What The Fuck You Want To Public License, version 2. # This is free software: you are free to do what the fuck you want to. @@ -15,7 +15,7 @@ test_index() { { $decodeindex "$1" 3>&- echo decode_status=$? >&3 } | { read val 3>&- - echo decode_val=$val >&3 + echo decode_val=\'$val\' >&3; }` eval "$decode_cmd" -- 2.43.2