mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-01-09 02:40:13 +01:00
The ancient bundled popt mishandles some cases of option parsing. http://lists.freedesktop.org/archives/pkg-config/2010-March/000508.html Add a test program to exercise it. This should encourage people to use an external popt until we have a better fix.
33 lines
742 B
Bash
Executable file
33 lines
742 B
Bash
Executable file
#! /bin/sh
|
|
|
|
# Make sure we're POSIX
|
|
if [ "$PKG_CONFIG_SHELL_IS_POSIX" != "1" ]; then
|
|
PKG_CONFIG_SHELL_IS_POSIX=1 PATH=`getconf PATH` exec sh $0 "$@"
|
|
fi
|
|
|
|
set -e
|
|
|
|
. ${srcdir}/common
|
|
|
|
# all of these should fail, but when '=' or ' ' aren't used consistently
|
|
# between the two options, broken popt sets the version to compare to be
|
|
# "a=b"
|
|
ARGS="--define-variable=a=b --atleast-pkgconfig-version=999.999"
|
|
EXPECT_RETURN=1
|
|
RESULT=""
|
|
run_test
|
|
|
|
ARGS="--define-variable=a=b --atleast-pkgconfig-version 999.999"
|
|
EXPECT_RETURN=1
|
|
RESULT=""
|
|
run_test
|
|
|
|
ARGS="--define-variable a=b --atleast-pkgconfig-version 999.999"
|
|
EXPECT_RETURN=1
|
|
RESULT=""
|
|
run_test
|
|
|
|
ARGS="--define-variable a=b --atleast-pkgconfig-version=999.999"
|
|
EXPECT_RETURN=1
|
|
RESULT=""
|
|
run_test
|