summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/format-python-brace-1
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2016-03-23 15:17:21 +0900
committerDaiki Ueno <ueno@gnu.org>2016-03-23 15:25:24 +0900
commitb4220c509a90186931a69575981c1b0e80ffc1f6 (patch)
treead4c7322b29c85b2c598ae34b26afd9545e0af2b /gettext-tools/tests/format-python-brace-1
parent009c1218593a5f5a6d132b3694e4e679572eff9f (diff)
downloadexternal_gettext-b4220c509a90186931a69575981c1b0e80ffc1f6.zip
external_gettext-b4220c509a90186931a69575981c1b0e80ffc1f6.tar.gz
external_gettext-b4220c509a90186931a69575981c1b0e80ffc1f6.tar.bz2
format-python-brace: Support chained expression
* gettext-tools/src/format-python-brace.c (parse_directive): Recognize chained getattr/getitem expressions. * gettext-tools/tests/format-python-brace-1: Add test for the case where both getattr and getitem are used. Reported by Paul Franklin in: https://lists.gnu.org/archive/html/bug-gettext/2016-03/msg00017.html
Diffstat (limited to 'gettext-tools/tests/format-python-brace-1')
-rwxr-xr-xgettext-tools/tests/format-python-brace-12
1 files changed, 2 insertions, 0 deletions
diff --git a/gettext-tools/tests/format-python-brace-1 b/gettext-tools/tests/format-python-brace-1
index 601b023..3a1f9ea 100755
--- a/gettext-tools/tests/format-python-brace-1
+++ b/gettext-tools/tests/format-python-brace-1
@@ -30,6 +30,8 @@ cat <<\EOF > f-pyb-1.data
"abc{value[0}"
# Invalid: unknown character in getitem operator
"abc{value[!]}"
+# Valid: use of both getattr and getitem operators
+"abc{value.v[name]}"
# Valid: format specifier
"abc{value:0}"
# Valid: standard format specifier