Allow ~ through unescaped

freedesktop #57078 (https://bugs.freedesktop.org/show_bug.cgi?id=57078)
This commit is contained in:
Michał Sawicz 2012-11-13 18:32:03 +00:00 committed by Dan Nicholson
parent 43f20b96a3
commit 69beecddb5
4 changed files with 24 additions and 3 deletions

View file

@ -25,7 +25,8 @@ TESTS = \
check-sysroot \
check-uninstalled \
check-debug \
check-gtk
check-gtk \
check-tilde
EXTRA_DIST = \
$(TESTS) \
@ -91,4 +92,5 @@ EXTRA_DIST = \
gtk/xau.pc \
gtk/xcb.pc \
gtk/xproto.pc \
gtk/xrender.pc
gtk/xrender.pc \
tilde.pc

13
check/check-tilde Normal file
View file

@ -0,0 +1,13 @@
#! /bin/sh
set -e
. ${srcdir}/common
# expect unescaped tilde from cflags
RESULT='-I~'
run_test --cflags tilde
# expect unescaped tilde from libs
RESULT='-L~'
run_test --libs tilde

5
check/tilde.pc Normal file
View file

@ -0,0 +1,5 @@
Name: tilde
Description: tilde test module
Version: 1.0
Libs: -L~
Cflags: -I~

View file

@ -583,7 +583,8 @@ static char *strdup_escape_shell(const char *s)
(s[0] > '=' && s[0] < '@') ||
(s[0] > 'Z' && s[0] < '^') ||
(s[0] == '`') ||
(s[0] > 'z')) {
(s[0] > 'z' && s[0] < '~') ||
(s[0] > '~')) {
r[c] = '\\';
c++;
}