From: Ileana Dumitrescu Date: Fri, 25 Oct 2024 16:06:44 +0000 (+0300) Subject: libtool: Avoid test failure in OpenBSD X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7bfd6884ceae4e792b17c9ea89097e8d00dbe2b;p=thirdparty%2Flibtool.git libtool: Avoid test failure in OpenBSD The following errors can be seen for the 'execute mode' test in OpenBSD: build/libtool: test: <: missing second argument build/libtool: test: >: missing second argument The cwrapper in OpenBSD cannot parse these symbols as arguments in execute mode if there are no other characters with them. * tests/execute-mode.at: Escape '<' and '>' in OpenBSD. --- diff --git a/tests/execute-mode.at b/tests/execute-mode.at index ac77c40bc..44b723bc5 100644 --- a/tests/execute-mode.at +++ b/tests/execute-mode.at @@ -170,6 +170,13 @@ LT_AT_NOINST_EXEC_CHECK([./main], [], [], [stdout], [ignore], ["arg with special chars: \$!&*'\`()"]) AT_CHECK([$FGREP 'arg with special chars: $!&*'\''`()' stdout], [], [ignore]) +# OpenBSD cwrapper has issues parsing '<' and '>' in execute mode without other +# characters, so the symbols are escaped during testing in OpenBSD. +escape= +case $host_os in openbsd*) + escape='\' ;; +esac + # We always pair two args. The first one is never the empty string. arg1= for arg2 in \ @@ -182,7 +189,7 @@ for arg2 in \ 'd\\' '' \ 'd\\\' '' \ 'd\\\\' '' \ - '<' '>' \ + "$escape<" "$escape>" \ '' '' do if test -z "$arg1"; then