Keep the backslash when parsing arguments (fixes #35)
parent
2d5dfe7d70
commit
ab48da3f33
|
@ -92,6 +92,8 @@ pkg_argv_split(const char *src, int *argc, char ***argv)
|
|||
free(argv);
|
||||
free(buf);
|
||||
return -1;
|
||||
} else {
|
||||
*dst_iter++ = '\\';
|
||||
}
|
||||
default:
|
||||
*dst_iter++ = *src_iter;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: quotes
|
||||
Description: A testing pkg-config file
|
||||
Version: 1.2.3
|
||||
Libs: -L${libdir} -lfoo
|
||||
Cflags: -DQUOTED=\"bla\"
|
|
@ -167,6 +167,10 @@ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --max-version 2.0 'foo '; echo \$
|
|||
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --cflags missing-require; echo \$?" \
|
||||
'1'
|
||||
|
||||
# test quoted #35
|
||||
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --cflags quotes" \
|
||||
"-DQUOTED=\\\"bla\\\""
|
||||
|
||||
# 10) tests for internal getopt implementation with options at the end
|
||||
if [ "x@STRICT_MODE@" = "xno" ]; then
|
||||
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} foo --libs" \
|
||||
|
|
Loading…
Reference in New Issue