File: check-cmd-options

package info (click to toggle)
pkg-config 0.26-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,784 kB
  • sloc: sh: 11,126; ansic: 3,897; makefile: 75
file content (33 lines) | stat: -rwxr-xr-x 742 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /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